On Wednesday, 12 May 2021 at 13:14:30 UTC, Dennis wrote:
>The root cause is:
Issue 20150 - -dip1000 defeated by pure
Moreover, the code example
int* escape(int* r) @safe pure
{
return r;
}
int* f() @safe
{
int x = 42;
return escape(&x); /* Should not compile. */
}
referenced at [1] correctly fails to compile with dmd master using -dip1000
as
main.d(9,20): Error: cannot take address of local `x` in `@safe` function `f`
Again, I fail to see the problem here.