[Issue 24535] New: Accepts Invalid: goto can skip declarations if they're labelled
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 3 20:47:26 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24535
Issue ID: 24535
Summary: Accepts Invalid: goto can skip declarations if they're
labelled
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: ben.james.jones at gmail.com
void f1(){ //fails with error about skipping a declaration
int x;
goto Label;
int y;
Label:
int z;
}
void f2(){ //compiles fine
int x;
goto Label;
Dummy:
int y;
Label:
int z;
}
--
More information about the Digitalmars-d-bugs
mailing list