dmd v2.065 compatibility

bearophile bearophileHUGS at lycos.com
Fri Mar 14 04:15:31 PDT 2014


> In D all variables get initialized at the definition point 
> (unless you add a "= void"). A goto skips this initialization, 
> and this breaks certain safety generates D relies on.

Look for @safe functions:

void main() @safe {
     int* p = void;
}


test.d(2,10): Error: variable test.main.p void initializers for 
pointers not allowed in safe functions

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list