Re: Various small patches (Zend, TSRM...)
| From: | Zeev Suraski | Date: | Tue, 05 Dec 2000 11:08:46 +0000 |
| Subject: | Re: Various small patches (Zend, TSRM...) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-40104@lists.php.net to get a copy of this message | ||
At 12:16 5/12/2000, Sascha Schumann wrote:
I disagree. Requiring functions to be fully prototyped does
make sense for type promotion. In order to distinguish
between old K&R prototypes and ISO C-conforming prototypes,
you need to write void.
I'm not saying that functions shouldn't be fully prototyped. I am saying that the need to write 'void' explicitly is really dumb, and I'd be happy to supress it. You kinda put words in Andi's mouth - he wondered if there was a way to turn off warnings for this pointless 'void' thing, not turning off function prototypes. You know that there's no such way, and automatically assumed that he (and I) want to turn function prototypes off completely.
It would have been a good thing if the committee got rid of the stupid (void) requirement in the new ANSI C standard. As far as I recall, it's also the only place where following the rules means your function prototype would (or can) be different from the function declaration itself (you need the void in the prototype, but you don't need it in the declaration). I could be wrong about this though.
Zeev
--
Zeev Suraski <zeev@zend.com>
CTO, Zend Technologies Ltd. http://www.zend.com/