[Issue 8662] Labels rejected in static foreach loop

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 24 06:40:52 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=8662


9999 <mailnew4ster at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mailnew4ster at gmail.com


--- Comment #2 from 9999 <mailnew4ster at gmail.com> 2013-11-24 06:40:51 PST ---
Maybe append internal suffix to every label?

e.g.:

void main()
{
    // static foreach
    foreach (x; EnumMembers!E)
    {
        goto Label;
    Label:
        int y;
    }
}

Will become:

void main()
{
    // static foreach
    {
        goto __Label_unroll_a_line_x_more_unique_info;
    __Label_unroll_a_line_x_more_unique_info:
        int y;
    }
    {
        goto __Label_unroll_b_line_y_more_unique_info;
    __Label_unroll_b_line_y_more_unique_info:
        int y;
    }
}

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


More information about the Digitalmars-d-bugs mailing list