GCC will spue a slew of warnings that can be safely ignored and in some cases are bogus. The pedantic changes only make the code harder to read and yield very little if any benefits in return. For larger, more complex structs like zvals it'll only create a meaningless mess. There is absolutely no reason that any half decent compiler will not be able to understand {0} for any declared struct.

On 27-Nov-07, at 10:12 AM, Andy Lester wrote:


On Nov 27, 2007, at 8:34 AM, Alexey Zakhlestin wrote:

On 11/27/07, Ilia Alshanetsky <[EMAIL PROTECTED]> wrote:
IMHO {0} is sufficiently clear for human consumption.

{NULL, 0, 0} brings real structure dimensions to the context, which is
good (less need to check "headers").

It also means that you don't get compiler errors any more like you would with {0}. Now, you can know that if there's a warning about the number of initializers that it's something you should pay attention to.

The key for long-term maintenance is to clean up the slop so that the compiler doesn't squawk about it at high levels of warnings. Then when you do have real squawk-worthy problems, they don't get lost in the noise of meaningless warnings.


--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance





Ilia Alshanetsky

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to