This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question about new warning system
DJ Delorie <dj@redhat.com> wrote:
>> if (OPT_Wmissing_braces)
>> warning (OPT_Wmissing_braces, "missing braces around
>> initializer");
>
> FYI OPT_Wmissing_braces is an enum constant; it will always be nonzero.
So, I assume this patch is wrong in this regard:
http://gcc.gnu.org/ml/gcc-cvs/2005-06/msg00392.html
>> [3]
>> warning (OPT_Wmissing_braces, "missing braces around initializer");
>
> That is what we decided to do.
>
> Note, however, if the logic required to determine if a warning is
> warranted is sufficiently complex, *also* checking the variable is
> considered an optimization:
OK, thanks!
--
Giovanni Bajo