This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/45977] "warning: 'i' initialized and declared 'extern'" is spurious
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Oct 2010 15:47:50 +0000
- Subject: [Bug c/45977] "warning: 'i' initialized and declared 'extern'" is spurious
- Auto-submitted: auto-generated
- References: <bug-45977-4@http.gcc.gnu.org/bugzilla/>
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.