This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/21689] Variable declaration after switch case expression causes compile error


------- Additional Comments From falk at debian dot org  2005-05-20 23:20 -------
(In reply to comment #0)
> If there is a variable declaration as the first statement after the colon at the
> end of a case expression, the compiler returns a syntax error.

That is exactly as expected. After the label, there needs to be a statement,
and declarations are not statements.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]