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

--- Comment #2 from Konrad Schwarz <konrad.schwarz at siemens dot com> 
2010-10-12 15:27:15 UTC ---
(In reply to comment #1)
> This is a coding style warning - the code is valid, but extremely 
> unidiomatic for C since "extern" is generally expected to mean that the 
> declaration is not providing a definition of the object.  Following static 
> by extern, though valid, is also a C feature of doubtful value.

I see the value of following static by extern -- the bug report provides an
example.  To restate, using extern in a definition allows overriding an
object's or function's linkage, which can be useful in a translation unit
consisting of files a user can change and files a user cannot.

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

To the contrary, this warning promulgates incorrect assumptions about "extern". 

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

Reply via email to