[Issue 18756] Escaping address of temporary struct field
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 13 03:28:44 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18756
Jonathan M Davis <issues.dlang at jmdavisProg.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |issues.dlang at jmdavisProg.co
| |m
--- Comment #2 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
Without -dip1000, & is not @safe. So, it's bug in that sense regardless. But on
top of that, it's taking the address of a _temporary_. It's never @safe to take
the address of a temporary and ideally, it wouldn't even be allowed in @sytem
code, because it's always a bug.
--
More information about the Digitalmars-d-bugs
mailing list