digitalmars.D.bugs - [Issue 21271] New: C++ header generation ignores extern(D) class
- d-bugmail puremagic.com (30/30) Sep 23 2020 https://issues.dlang.org/show_bug.cgi?id=21271
https://issues.dlang.org/show_bug.cgi?id=21271 Issue ID: 21271 Summary: C++ header generation ignores extern(D) class methods affecting vtable layout Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: kinke gmx.net Leading to a corrupt C++ vtable, e.g.: extern(C++) class C { extern(D) void virtualFoo1() {} void virtualFoo2() {} } dmd -HC ... => class C { public: // ignoring extern () block because of linkage virtual void virtualFoo2(); }; Overridden virtual functions can probably be still ignored, but new virtual functions need a dummy declaration on the C++ side. --
Sep 23 2020