[Issue 23175] -preview=in silently adds possible stack memory escape

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 16 16:31:33 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=23175

--- Comment #12 from Paul Backus <snarwin+bugzilla at gmail.com> ---
The most straightforward fix would be to have the compiler emit a warning any
time an `in` parameter escapes from a function in @system or @trusted code
(i.e., the same thing it currently emits an error for in @safe code).

If we don't want to make the warning part of `-preview=in` itself, having it
enabled by `-transition=in` could also work (though I suspect the vast majority
of users will never discover it there).

--


More information about the Digitalmars-d-bugs mailing list