Re: CVS update: php3/functions
| From: | Sascha Schumann | Date: | Mon, 21 Dec 1998 05:22:21 +0000 |
| Subject: | Re: CVS update: php3/functions | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-2946@lists.php.net to get a copy of this message | ||
On Sun, 20 Dec 1998, Rasmus Lerdorf wrote:
> > -pedantic -Wall -Wmissing-prototypes -Wmissing-declarations
> >
> > If one ignores warnings about inline functions, PHP (almost) compiles quietly.
>
> We have had this discussion before. The agreed upon flags are in
> --enable-debug and they are like yours except without -pedantic. I think
> adding this one is going too far. Wild casting like what you just added
> does not help anybody. Anything that generates a warning under:
>
> -Wall -Wmissing-prototypes -Wmissing-declarations
>
> should be fixed.
I must have missed that.
> The kind of casting you added is more likely to hide bugs than fix
> them.
No. My changes added explicit casts, without them the casts would be
applied implicitly.
> Also, as per the gcc man page regarding the -pedantic option:
>
> "There is no reason to use this option; it exists only to satisfy
> pedants."
>
> Unless you can make a good case for these changes I think you should
> reverse them.
This patch has shown one thing - there are many places in php which use
different signedness. And often, this is plain useless. Unless one needs
to work with the data, the simplest possible declaration should be used
for its type (e.g. char over unsigned char).
Someone must have had an idea - "we support locales now, so we need to
support 8 bit data now, too". As a result there were unsigned char * spit
all over the place.
IMHO this should be cleaned up - NOT by using explicit casts, but by
applying a more consequent policy.
Regards,
Sascha Schumann |
Consultant | finger sas@schell.de
| for PGP public key
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net