effect of a label on following block

Ellery Newcomer ellery-newcomer at utulsa.edu
Mon Nov 15 08:45:29 PST 2010

poking around a little more and I really don't know what's going on.

fun piece of trivia though: while loops get rewritten to for loops, so

for(;;) l1 {
    int v;
v = 4;

exhibits the same behavior as the while loop.

do loops seem to do the same thing as the if statement

On 11/15/2010 10:34 AM, Ellery Newcomer wrote:
> My gut feeling is that the if statement's behavior is wrong and the
> while statement's is correct, but it could go either way.
> No need for a rationale for what can be adequately explained as a
> compiler bug (this is a downside of dmd - it trains you to think like
> this) It is curious, though, as it looks like both bodies get parsed the
> same way. Not sure what's going on.
> Please to report to bugzilla

More information about the Digitalmars-d-learn mailing list