@@ -737,19 +737,30 @@ extern "C++" {
737737# define ZEND_INDIRECT_RETURN
738738#endif
739739
740- #if __GNUC__ && !defined(__clang__)
741- # define __DO_PRAGMA (x ) _Pragma (#x)
742- # define _DO_PRAGMA (x ) __DO_PRAGMA(x)
743- # define ZEND_CGG_DIAGNOSTIC_IGNORED_START (warning ) \
740+ #define __ZEND_DO_PRAGMA (x ) _Pragma (#x)
741+ #define _ZEND_DO_PRAGMA (x ) __ZEND_DO_PRAGMA(x)
742+ #if defined(__clang__)
743+ # define ZEND_DIAGNOSTIC_IGNORED_START (warning ) \
744+ _Pragma (" clang diagnostic push" ) \
745+ _ZEND_DO_PRAGMA(clang diagnostic ignored warning)
746+ # define ZEND_DIAGNOSTIC_IGNORED_END \
747+ _Pragma (" clang diagnostic pop" )
748+ #elif defined(__GNUC__)
749+ # define ZEND_DIAGNOSTIC_IGNORED_START (warning ) \
744750 _Pragma (" GCC diagnostic push" ) \
745- _DO_PRAGMA (GCC diagnostic ignored warning)
746- # define ZEND_CGG_DIAGNOSTIC_IGNORED_END \
751+ _ZEND_DO_PRAGMA (GCC diagnostic ignored warning)
752+ # define ZEND_DIAGNOSTIC_IGNORED_END \
747753 _Pragma (" GCC diagnostic pop" )
748754#else
749- # define ZEND_CGG_DIAGNOSTIC_IGNORED_START (warning )
750- # define ZEND_CGG_DIAGNOSTIC_IGNORED_END
755+ # define ZEND_DIAGNOSTIC_IGNORED_START (warning )
756+ # define ZEND_DIAGNOSTIC_IGNORED_END
751757#endif
752758
759+ /* * @deprecated */
760+ #define ZEND_CGG_DIAGNOSTIC_IGNORED_START ZEND_DIAGNOSTIC_IGNORED_START
761+ /* * @deprecated */
762+ #define ZEND_CGG_DIAGNOSTIC_IGNORED_END ZEND_DIAGNOSTIC_IGNORED_END
763+
753764#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
754765# define ZEND_STATIC_ASSERT (c, m ) _Static_assert ((c), m)
755766#else
0 commit comments