http://d.puremagic.com/issues/show_bug.cgi?id=7894
Summary: [CTFE] - goto within ForStatement restarts loop Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: d...@dawgfoto.de --- Comment #0 from d...@dawgfoto.de 2012-04-12 15:25:07 PDT --- cat > bug.d << CODE int foo() { foreach(v; 0 .. 2) { auto n = v; Lagain: if (n--) goto Lagain; } return 0; } enum ctfe = foo(); CODE dmd -c bug.d -------- This will loop endlessly because the loop initializer is reinterpreted after each goto. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------