zend: ZEND_NONSTRING for clang >= 20 support (#19193)

This commit is contained in:
David CARLIER 2025-07-20 22:27:06 +01:00 committed by GitHub
parent d7f9caf37c
commit e91d2c719f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -769,7 +769,7 @@ extern "C++" {
# define ZEND_INDIRECT_RETURN
#endif
#if __has_attribute(nonstring) && defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 15
#if __has_attribute(nonstring) && defined(__GNUC__) && ((!defined(__clang__) && __GNUC__ >= 15) || (defined(__clang_major__) && __clang_major__ >= 20))
# define ZEND_NONSTRING __attribute__((nonstring))
#else
# define ZEND_NONSTRING