This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25779] New: mixed declaration and code switch statement parsing issue
- From: "ecollins at vmware dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2006 03:00:17 -0000
- Subject: [Bug c/25779] New: mixed declaration and code switch statement parsing issue
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
C99 supports mixed declarations and code but the following does not compile
(with --std=c99). It will compile if you uncomment the lone semicolon, a parser
bug, or perhaps I'm missing something?
#include <stdio.h>
main()
{
int a = 0;
switch (a) {
case 0:
//;
int b = 0;
printf("%d\n",b);
break;
}
}
--
Summary: mixed declaration and code switch statement parsing
issue
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ecollins at vmware dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25779