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

Dennis <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
           Hardware|x86                         |All
            Summary|[dip1000] scope analysis    |returning expired stack
                   |does not respect @system or |pointers in @system code
                   |@trusted                    |allowed by spec, not by
                   |                            |implementation
           Severity|major                       |normal

--- Comment #1 from Dennis <[email protected]> ---
It doesn't compile without -dip1000 either, the error predates it.

> this workaround should not be required.

Intentionally returning an expired stack pointer should be a very rare
occurrence, I think a workaround is warranted. However, the spec says:

> @system functions may perform any operation legal from the perspective of the 
> language including inherently memory unsafe operations like returning 
> pointers to expired stackframes

https://dlang.org/spec/memory-safe-d.html

So at least one has to change: the implementation, or the spec.

--

Reply via email to