http://d.puremagic.com/issues/show_bug.cgi?id=4101
Summary: DMD doesn't give error when goto skips initialization
Product: D
Version: 2.041
Platform: Other
OS/Version: Linux
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Jerry Quinn <[email protected]> 2010-04-17 13:23:00 PDT
---
The following code should not compile but does with DMD 2.041.
The goto skips several initializations.
void foo() {
goto L0;
int b;
struct S { int a; this(int c) { a=c; } }
S s = S(5);
class C { int a; }
C c = new C;
L0: ;
s.a++;
c.a++;
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------