https://d.puremagic.com/issues/show_bug.cgi?id=11977
Summary: Regression 2.065.b1: goto skips declaration of
variable
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Jacob Carlborg <[email protected]> 2014-01-23 05:17:53 PST ---
This code used to compile with DMD 2.064.2:
void main()
{
int i;
switch (i)
{
case 1:
goto Lno_consume; // Line 10
break;
default:
}
int x; // Line 15
for (int* tp = &x, tp_end = tp + 3; tp < tp_end; ++tp) { }
Lno_consume: {}
}
But fails to compile with 2.065.b1 wit this error message:
Error: goto skips declaration of variable main.main.x at main.d(15)
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------