# attribute format not workng for GCC-3.0

- Thread: https://externals.io/message/4466
- Original archive: https://news-web.php.net/php.internals/4466
- Started by Ard Biesheuvel on 2003-09-14T01:12:14+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #4466 — Ard Biesheuvel — 2003-09-14T01:12:14+00:00

URL: https://externals.io/message/4466#4466

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)
