No modification of pointer values in safe functions?

Mark smarksc at gmail.com
Wed Jan 3 22:02:22 UTC 2018


The documentation says the modification of pointer values is not 
allowed in safe functions. Yet the following compiles fine on dmd:

void main() @safe
{
	int* x = new int;
	int* y = new int;
	y=x;
}

Is this simply a compiler bug?


More information about the Digitalmars-d-learn mailing list