Immutable + goto?

dsimcha dsimcha at yahoo.com
Thu Mar 19 08:07:33 PDT 2009


import std.stdio;

uint bar = 0;

void main() {
    start:
    immutable uint foo = bar;
    bar++;
    writeln(foo);
    goto start;
}

foo changes in this case.  Is this a real bug, or is it considered undefined
behavior to use goto in this way?



More information about the Digitalmars-d mailing list