www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11659] New: false positive goto skips initialization of variable error (skipping enum initialization)

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11659

           Summary: false positive goto skips initialization of variable
                    error (skipping enum initialization)
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code dawg.eu


--- Comment #0 from Martin Nowak <code dawg.eu> 2013-12-01 11:38:30 PST ---
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

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 01 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11659


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid
            Version|unspecified                 |D2


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-12-01 23:14:11 PST ---
https://github.com/D-Programming-Language/dmd/pull/2911

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 01 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11659



--- Comment #2 from github-bugzilla puremagic.com 2013-12-02 22:10:50 PST ---
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)

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 02 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11659


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 02 2013