Bug 11659 – false positive goto skips initialization of variable error (skipping enum initialization)

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-01T11:38:00Z
Last change time
2013-12-02T23:18:14Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2013-12-01T11:38:30Z
cat > goto.d << CODE int main() { goto LABEL; enum expr = "0"; LABEL: return mixin(expr); } CODE dmd -c goto ---- goto.d(3): Error: goto skips declaration of variable goto.main.expr at goto.d(4) ---- This is a regression introduced with https://github.com/D-Programming-Language/dmd/pull/2839. Reported by bearophile: https://d.puremagic.com/issues/show_bug.cgi?id=602#c22
Comment #1 by k.hara.pg — 2013-12-01T23:14:11Z
Comment #2 by github-bugzilla — 2013-12-02T22:10:50Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/05beebea3ce362931aea9f8c3bdf33e0720b957b fix Issue 11659 - false positive goto skips initialization of variable error (skipping enum initialization) https://github.com/D-Programming-Language/dmd/commit/b8554bc11d38888f58d5705abb723366fd1a9860 Merge pull request #2911 from 9rnsr/fix11659 [REG2.065a] Issue 11659 - false positive goto skips initialization of variable error (skipping enum initialization)