[Bug c/45977] "warning: 'i' initialized and declared 'extern'" is spurious

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Tue Oct 12 15:47:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45977

--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2010-10-12 15:47:45 UTC ---
On Tue, 12 Oct 2010, konrad.schwarz at siemens dot com wrote:

> Whether or not this is idiomatic usage, or corresponds to what is generally
> expected, is not sufficient grounds for a warning.

That is the whole point of warnings: to diagnose dubious usages that 
cannot be given hard errors because they are formally valid according to 
the standard.

> At the very least, there must be a way of turning this warning off.

That is the only actual bug I see here: all warnings should have options 
controlling them.



More information about the Gcc-bugs mailing list