Bug 24535 – Accepts Invalid: goto can skip declarations if they're labelled

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2024-05-03T20:47:26Z
Last change time
2024-05-03T21:02:17Z
Assigned to
No Owner
Creator
Ben

Comments

Comment #0 by ben.james.jones — 2024-05-03T20:47:26Z
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; }
Comment #1 by ben.james.jones — 2024-05-03T21:02:17Z
*** This issue has been marked as a duplicate of issue 24534 ***