Bug 13321 – Wrong goto skips declaration error

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-08-18T14:26:00Z
Last change time
2015-02-18T03:40:39Z
Keywords
diagnostic, pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-08-18T14:26:46Z
Reduced from a post by nrgyzer: struct Foo { this(int) {} } void main(string[] args) { Foo x; if (args.length > 1) goto EXIT; x = Foo(1); EXIT: } 2.067alpha gives an error message that I think is spurious (rejects-valid): test.d(7,9): Error: goto skips declaration of variable test.main.__ctmp1 at test.d(8,12)
Comment #1 by dlang-bugzilla — 2014-08-18T23:20:01Z
Comment #2 by k.hara.pg — 2014-08-22T14:21:32Z
Comment #3 by bugzilla — 2014-08-23T00:07:31Z
A fix to get us past the regression for 2.066: https://github.com/D-Programming-Language/dmd/pull/3889
Comment #4 by github-bugzilla — 2014-08-27T15:53:54Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1bfe1c7c2c983218368b873658c0579701ef1a2d [reg] Temporary fix Issue 13321 - Wrong goto skips declaration error https://github.com/D-Programming-Language/dmd/commit/5eae12e8346e50f544ef13cb2318ce265a1dec57 Merge pull request #3889 from WalterBright/fix13321 [reg] Temporary fix Issue 13321 - Wrong goto skips declaration error
Comment #5 by github-bugzilla — 2014-08-28T04:10:25Z
Commit pushed to 2.066 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4532cfee6a139bc712ea08267560ec77027accba Merge pull request #3889 from WalterBright/fix13321 [reg] Temporary fix Issue 13321 - Wrong goto skips declaration error
Comment #6 by github-bugzilla — 2014-12-06T17:49:06Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/91e6e877110d3f24d94f35d4292b9a92e44e078b fix Issue 13321 - Wrong goto skips declaration error https://github.com/D-Programming-Language/dmd/commit/1f8174f5744fe1b338d69605273a4373df77b507 Merge pull request #3885 from 9rnsr/fix13321 [REG2.065] Issue 13321 - Wrong goto skips declaration error
Comment #7 by github-bugzilla — 2015-02-18T03:40:39Z