@@ -685,17 +685,28 @@ extern "C++" {
685685# define ZEND_INDIRECT_RETURN
686686#endif
687687
688- #if __GNUC__ && !defined(__clang__)
689- # define __DO_PRAGMA (x ) _Pragma (#x)
690- # define _DO_PRAGMA (x ) __DO_PRAGMA(x)
691- # define ZEND_CGG_DIAGNOSTIC_IGNORED_START (warning ) \
688+ #define __ZEND_DO_PRAGMA (x ) _Pragma (#x)
689+ #define _ZEND_DO_PRAGMA (x ) __ZEND_DO_PRAGMA(x)
690+ #if defined(__clang__)
691+ # define ZEND_DIAGNOSTIC_IGNORED_START (warning ) \
692+ _Pragma (" clang diagnostic push" ) \
693+ _ZEND_DO_PRAGMA(clang diagnostic ignored warning)
694+ # define ZEND_DIAGNOSTIC_IGNORED_END \
695+ _Pragma (" clang diagnostic pop" )
696+ #elif defined(__GNUC__)
697+ # define ZEND_DIAGNOSTIC_IGNORED_START (warning ) \
692698_Pragma (" GCC diagnostic push" ) \
693- _DO_PRAGMA (GCC diagnostic ignored warning)
694- # define ZEND_CGG_DIAGNOSTIC_IGNORED_END \
699+ _ZEND_DO_PRAGMA (GCC diagnostic ignored warning)
700+ # define ZEND_DIAGNOSTIC_IGNORED_END \
695701_Pragma (" GCC diagnostic pop" )
696702#else
697- # define ZEND_CGG_DIAGNOSTIC_IGNORED_START (warning )
698- # define ZEND_CGG_DIAGNOSTIC_IGNORED_END
703+ # define ZEND_DIAGNOSTIC_IGNORED_START (warning )
704+ # define ZEND_DIAGNOSTIC_IGNORED_END
699705#endif
700706
707+ /* * @deprecated */
708+ #define ZEND_CGG_DIAGNOSTIC_IGNORED_START ZEND_DIAGNOSTIC_IGNORED_START
709+ /* * @deprecated */
710+ #define ZEND_CGG_DIAGNOSTIC_IGNORED_END ZEND_DIAGNOSTIC_IGNORED_END
711+
701712#endif /* ZEND_PORTABILITY_H */
0 commit comments