https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292

--- Comment #9 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to M Welinder from comment #3)
> I am not aware of a rule that requires the compiler to ignore context
> when considering warnings.  It certainly does consider context when
> it issues "might be used uninitialized" warnings, so why not here?

Wuninitialized warnings are implemented in the middle-end. They benefit from
the analysis done by optimization, but also suffer from the optimizations
transforming and removing code (PR18501 and
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings).

Warnings in the FE, like this one, are more consistent but there is very
limited analysis done in the FE (because it is harder to implement in the FE,
it may slow down the compiler and would duplicate the analysis done in the
middle-end for optimization).

Reply via email to