[Issue 18016] using uninitialized value is considered @safe but has undefined behavior

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 7 09:01:35 UTC 2019


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

--- Comment #10 from anonymous4 <dfj1esp02 at sneakemail.com> ---
AFAIK, Walter's suggestion is not supported by LLVM. Currently LLVM removes
code that uses uninitialized value. To work it around LDC will need to
initialize variables initialized with void and provide an different way to
declare uninitialized variables. Likely not a problem, but results in minor
fragmentation of language. I believe LDC way will have a priority, because DMD
is not really about performance anyway, so default initialized variables for it
are good enough.

--


More information about the Digitalmars-d-bugs mailing list