arn...@skeeve.com writes:

>> At this point I wouldn't worry about the older clang and gcc versions 
>> that complain about {0} as an initializer. We can either let them die 
>> off noisily, or use the appropriate -Wno-whatever option when using them 
>> to compile.
>
> I've decided to just not worry about it. It's impossible to compile
> without warnings on every single C compiler in the world.

Indeed, and further, I believe that changing code to silence warnings
from any non-modern or preferred compilers is counter-productive.  Even
further, I also believe that if we run into a situation where modern gcc
(or clang?) produces a warning we don't agree with, we should try to get
that fixed in the compiler and not make any code change.

This approach unfortunately implies that we can't add -Werror to the
default flags, something I earlier thought was a nice goal, but have
reconsidered: it is better to have warnings for things we believe the
compiler shouldn't warn about, than to modify code to silence the
compiler, even if it is a modern gcc.  In an ideal world, compilers
shouldn't warn about things we believe it shouldn't warn about, but
we'll never reach it so we shouldn't use -Werror.

/Simon

Attachment: signature.asc
Description: PGP signature

Reply via email to