------- Comment #8 from manu at gcc dot gnu dot org  2010-05-09 15:26 -------
(In reply to comment #7)
> There should be some consistency at least! I'd like to see this fixed 
> properly.
> The compiler should be perfectly predictable, and not like "Sorry, i don't 
> like

It is predictable: a label can only be part of a statement and a declaration is
not a statement.  Now "return x;" is a statement, so it compiles fine.  This is
mandated by the C standard, it is not the compiler's decision. Does it work
different with any other compiler?

Please, tell us what is difficult to understand in the error message and how
could it be better explained.

On the other hand, I don't know whether if GCC adds an empty statement before
the declaration and just emits a warning with -pedantic, then it still complies
with the C standard. I don't have time to investigate this, sorry.


> this construct here... put a semicolon please".
> 
> I'd like this bug to be reopened and FIXED PROPERLY
> 
> gcc --version =  (Gentoo 4.4.3-r2 p1.2) 4.4.3
> 


-- 


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

Reply via email to