https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100353
Bug ID: 100353 Summary: Accepts invalid label Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- GCC 11 started to accept void b() { int d; e: int f; } which was previously rejected as t.c: In function 'b': t.c:5:3: error: a label can only be part of a statement and a declaration is not a statement 5 | int f; | ^~~ t.c:4:1: error: label at end of compound statement 4 | e: | ^ and which clang also rejects: t.c:5:3: error: expected expression int f; ^ 1 error generated.