Re: svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/pcre/pcrelib/AUTHORS branches/PHP_5_2/ext/pcre/pcrelib/ChangeLog
branches/PHP_5_2/ext/pcre/pcrelib/HACKING branches/PHP_5_2/ext/pcre/pcrelib/LICENCE branches/PHP_5_2/ext/pcre
| From: | Gwynne Raskind | Date: | Fri, 22 Jan 2010 14:21:24 +0000 |
| Subject: | Re: svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/pcre/pcrelib/AUTHORS branches/PHP_5_2/ext/pcre/pcrelib/ChangeLog branches/PHP_5_2/ext/pcre/pcrelib/HACKING branches/PHP_5_2/ext/pcre/pcrelib/LICENCE branches/PHP_5_2/ext/pcre |
||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-61594@lists.php.net to get a copy of this message | ||
On Jan 22, 2010, at 9:06 AM, Pierre Joye wrote:
>> ps. I think it might be beneficial for PHP at large to depend more on
>> C99 as the types are needed in multiple places and other C99 features
>> might be interesting ...
> The main problem is gcc thinking that adding random c99 features to
> default is a good thing to do.
Which we can completely blast by passing -std=c89 or -ansi, the lowest common denominator of ANSI C.
That should disable something like 95% of gcc's extensions. If we wanted to go for never using
ANYTHING gcc-specific (except explicitly, as in __attribute__), we could add -pedantic. It'd
probably take days just to make things build again, though; I just tried "make
EXTRA_CFLAGS=-ansi" and couldn't build a single file (zend_alloc.h uses "static
inline", a GNU extension in C89 mode).
> However, we could as well define these types on demand using the
> configure script. That will solve 99% of the resons why poeple use
> stdint.h.
IMHO, that's a pretty good solution.
-- Gwynne