[Issue 18016] using uninitialized value is considered @safe but has undefined behavior
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 10 23:29:52 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=18016
--- Comment #12 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to anonymous4 from comment #10)
> 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.
I don't understand how the suggestion that the behavior is implementation
defined doesn't jive with LLVM's chosen behavior.
--
More information about the Digitalmars-d-bugs
mailing list