[Issue 7894] [CTFE] - goto within ForStatement restarts loop

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 9 01:28:03 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7894


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2012-07-09 01:28:00 PDT ---
Slightly reduced test case:

int bug7894()
{
    for (int k = 0; k < 2; ++k) {
        goto Lagain;
Lagain: ;
    }
    return 1;
}
static assert( bug7894() );

Actually the loop initializer isn't reinterpreted after each goto. What's
happening is that the increment is skipped.

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


More information about the Digitalmars-d-bugs mailing list