attribute format not workng for GCC-3.0
| From: | Ard Biesheuvel | Date: | Sun, 14 Sep 2003 01:12:14 +0000 |
| Subject: | attribute format not workng for GCC-3.0 | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-4466@lists.php.net to get a copy of this message | ||
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)