[Issue 15869] RVO can overwrite argument
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 14 09:26:19 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=15869
FeepingCreature <default_357-line at yahoo.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |default_357-line at yahoo.de
--- Comment #6 from FeepingCreature <default_357-line at yahoo.de> ---
I think what's happening here is that DMD thinks that because a is assigned in
the XX constructor, the member a is to be initialized by the constructor and
not the default initializer. As a result, &a is technically
use-before-initialization and invalid.
If true, then even though it's invalid code this still needs to be added to the
docs, because it is somewhat unintuitive.
--
More information about the Digitalmars-d-bugs
mailing list