[Issue 19919] Incorrect initialization of union when first member isn't marked = void
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 4 16:20:16 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19919
Andrei Alexandrescu <andrei at erdani.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
CC| |andrei at erdani.com
--- Comment #2 from Andrei Alexandrescu <andrei at erdani.com> ---
I think the principle of maximum simplicity goes like this:
* Only the first field can have an initializer (if you want another field...
move it to the top).
* If that initializer is "= void", the union is void-initialized.
All else is in error. That's that. Doesn't prevent any work getting done and is
simple to spec and implement.
--
More information about the Digitalmars-d-bugs
mailing list