Bug 18891 – extern(C++) destructor prototype should just link; not generate field/aggregate dtor

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-05-21T05:30:51Z
Last change time
2018-05-23T00:13:12Z
Keywords
C++
Assigned to
No Owner
Creator
Manu

Comments

Comment #0 by turkeyman — 2018-05-21T05:30:51Z
extern(C++) classes with an extern destructor prototype still attempt to generate __xdtor locally if they have aggregate members. This functionality should be subverted in the extern(C++) dtor case, because C++ destructors always perform a full destruction.
Comment #1 by github-bugzilla — 2018-05-21T19:39:03Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/8863b8ed927b8f5d935fe40ea19c7e30d5040b1d Fix issue 18891 - extern(C++) destructor prototype should just link; not generate field/aggregate dtor https://github.com/dlang/dmd/commit/64b4e150e4e25e77a69d5df3991ded4559513275 Merge pull request #8275 from TurkeyMan/extern_cpp_dtor Fix issue 18891 - extern(C++) destructor prototype should just link merged-on-behalf-of: Walter Bright <[email protected]>
Comment #2 by turkeyman — 2018-05-23T00:13:12Z
This happens on my home PC and my work PC too. VS2015.