attribute format not workng for GCC-3.0

php.internals

Ard Biesheuvel

22 years ago
Could someone commit the following patch to zend.h in HEAD and PHP_4_3 ? The __attribute__ ((format)) doesn't work for function pointers on gcc-3.0, (see bug #25528) Wouldn't it be better to #define all these format attributes void when ZEND_DEBUG is disabled, as they're really only helpful for debugging, but useless for production code ? Ard Index: zend.h =================================================================== RCS file: /repository/ZendEngine2/zend.h,v retrieving revision 1.224 diff -u -r1.224 zend.h --- zend.h 31 Aug 2003 09:35:54 -0000 1.224 +++ zend.h 14 Sep 2003 01:03:52 -0000 @@ -164,7 +164,7 @@ # define ZEND_ATTRIBUTE_FORMAT(type, idx, first) #endif -#if ZEND_GCC_VERSION >= 3000 +#if ZEND_GCC_VERSION >= 3002 # define ZEND_ATTRIBUTE_PTR_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first))) #else # define ZEND_ATTRIBUTE_PTR_FORMAT(type, idx, first)