This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/21689] Variable declaration after switch case expression causes compile error
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 May 2005 23:20:15 -0000
- Subject: [Bug c/21689] Variable declaration after switch case expression causes compile error
- References: <20050520231042.21689.matt_hicks@bose.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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