c/8293: C99 declaration syntax not accepted after case label
drepper@redhat.com
drepper@redhat.com
Sun Oct 20 12:26:00 GMT 2002
>Number: 8293
>Category: c
>Synopsis: C99 declaration syntax not accepted after case label
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Oct 20 12:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Ulrich Drepper
>Release: gcc 3.2
>Organization:
>Environment:
Linux x86, but this is platform independent
>Description:
If a variable declaration follows directly to a case label the compiler reports an error. C99 allows this and gcc must support it if -std=c99 or -stdc=gnu99 is used.
>How-To-Repeat:
Compile:
int foo (int x) { switch (x) { case 1: int y = x; return y; default: return x + 1; } }
>Fix:
N/A
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="u.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="u.c"
aW50IGZvbyAoaW50IHgpIHsgc3dpdGNoICh4KSB7IGNhc2UgMTogaW50IHkgPSB4OyByZXR1cm4g
eTsgZGVmYXVsdDogcmV0dXJuIHggKyAxOyB9IH0K
More information about the Gcc-bugs
mailing list