@@ -270,7 +270,7 @@ char *alloca();
270270# define ZEND_ATTRIBUTE_NODISCARD
271271#endif
272272
273- #if ZEND_GCC_VERSION >= 3000
273+ #if ZEND_GCC_VERSION >= 3000 || __has_attribute(const)
274274# define ZEND_ATTRIBUTE_CONST __attribute__ ((const ))
275275#else
276276# define ZEND_ATTRIBUTE_CONST
@@ -312,7 +312,7 @@ char *alloca();
312312# define ZEND_ATTRIBUTE_NONNULL_ARGS (...)
313313#endif
314314
315- #if defined(__GNUC__) && ZEND_GCC_VERSION >= 4003
315+ #if ( defined(__GNUC__) && ZEND_GCC_VERSION >= 4003) || __has_attribute(cold)
316316# define ZEND_COLD __attribute__ ((cold))
317317# ifdef __OPTIMIZE__
318318# define ZEND_OPT_SIZE __attribute__ ((optimize(" Os" )))
@@ -327,7 +327,7 @@ char *alloca();
327327# define ZEND_OPT_SPEED
328328#endif
329329
330- #if defined(__GNUC__) && ZEND_GCC_VERSION >= 5000
330+ #if ( defined(__GNUC__) && ZEND_GCC_VERSION >= 5000)
331331# define ZEND_ATTRIBUTE_UNUSED_LABEL __attribute__ ((unused));
332332# define ZEND_ATTRIBUTE_COLD_LABEL __attribute__ ((cold));
333333#else
@@ -651,8 +651,8 @@ extern "C++" {
651651#endif
652652
653653/* Do not use for conditional declaration of API functions! */
654- #if defined(ZEND_INTRIN_PCLMUL_RESOLVER) && defined(ZEND_INTRIN_HAVE_IFUNC_TARGET) && (!defined(__GNUC__) || (ZEND_GCC_VERSION >= 9000))
655- /* __builtin_cpu_supports has pclmul from gcc9 */
654+ #if defined(ZEND_INTRIN_PCLMUL_RESOLVER) && defined(ZEND_INTRIN_HAVE_IFUNC_TARGET) && (!defined(__GNUC__) || (defined(__clang__) && __clang_major__ >= 19) || ( ZEND_GCC_VERSION >= 9000))
655+ /* __builtin_cpu_supports has pclmul from gcc9 and clang 19 */
656656# define ZEND_INTRIN_PCLMUL_FUNC_PROTO 1
657657#elif defined(ZEND_INTRIN_PCLMUL_RESOLVER)
658658# define ZEND_INTRIN_PCLMUL_FUNC_PTR 1
@@ -677,8 +677,8 @@ extern "C++" {
677677#endif
678678
679679/* Do not use for conditional declaration of API functions! */
680- #if defined(ZEND_INTRIN_SSE4_2_PCLMUL_RESOLVER) && defined(ZEND_INTRIN_HAVE_IFUNC_TARGET) && (!defined(__GNUC__) || (ZEND_GCC_VERSION >= 9000))
681- /* __builtin_cpu_supports has pclmul from gcc9 */
680+ #if defined(ZEND_INTRIN_SSE4_2_PCLMUL_RESOLVER) && defined(ZEND_INTRIN_HAVE_IFUNC_TARGET) && (!defined(__GNUC__) || (defined(__clang__) && __clang_major__ >= 19) || ( ZEND_GCC_VERSION >= 9000))
681+ /* __builtin_cpu_supports has pclmul from gcc9 and clang 19 */
682682# define ZEND_INTRIN_SSE4_2_PCLMUL_FUNC_PROTO 1
683683#elif defined(ZEND_INTRIN_SSE4_2_PCLMUL_RESOLVER)
684684# define ZEND_INTRIN_SSE4_2_PCLMUL_FUNC_PTR 1
0 commit comments