[Issue 11331] Inefficient initialization of struct with members = void

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 24 19:49:46 UTC 2018


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

johanengelen at weka.io changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |johanengelen at weka.io

--- Comment #9 from johanengelen at weka.io ---
Assignment with T.init is used to remove dangling pointers after destruction:
https://github.com/dlang/druntime/blob/54ab96e9977e0c6baa7ed9740810058fd4aec6ef/src/object.d#L3082-L3098
So if spec is changed/clarified on this issue, we probably need to change/fix
that code too. (if there isn't already, we need help from traits to figure out
which members are =void, such that we can zero them explicitly)

--


More information about the Digitalmars-d-bugs mailing list