Bug 23567 – pragma(printf) messes up with the vtable of extern(C++) classes

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2022-12-18T16:12:00Z
Last change time
2023-01-01T06:25:14Z
Keywords
pull
Assigned to
No Owner
Creator
naydef

Comments

Comment #0 by naydef — 2022-12-18T16:12:00Z
assertion fails on DMD 2.101.1 assertion passes on DMD 2.100.2 app.d ------------------------------------------------------- extern(C++) abstract class CCvar { public: pragma(printf) void func1(const(char)* pFormat, ...); pragma(printf) void func2(const(char)* pFormat, ...); } static assert(__traits(getVirtualIndex, CCvar.func2) == 1); pragma(msg, __traits(getVirtualIndex, CCvar.func2)); void main() {} ------------------------------------------------------- dmd -o- app.d Thanks to CyberShadow for bisecting. Issue introduced in https://github.com/dlang/dmd/pull/14503
Comment #1 by dlang-bot — 2022-12-19T03:46:49Z
@ibuclaw created dlang/dmd pull request #14717 "fix Issue 23567 - pragma(printf) messes up with the vtable of extern(C++) classes" fixing this issue: - fix Issue 23567 - pragma(printf) messes up with the vtable of extern(C++) classes https://github.com/dlang/dmd/pull/14717
Comment #2 by dlang-bot — 2022-12-20T13:30:27Z
dlang/dmd pull request #14717 "fix Issue 23567 - pragma(printf) messes up with the vtable of extern(C++) classes" was merged into stable: - c45e967c1901604f414d3411d7200e8348c77203 by Iain Buclaw: fix Issue 23567 - pragma(printf) messes up with the vtable of extern(C++) classes https://github.com/dlang/dmd/pull/14717
Comment #3 by dlang-bot — 2023-01-01T06:25:14Z
dlang/dmd pull request #14765 "merge stable" was merged into master: - a6e34f8ae8107b2abbd0625228590067fa63b8b2 by Iain Buclaw: fix Issue 23567 - pragma(printf) messes up with the vtable of extern(C++) classes https://github.com/dlang/dmd/pull/14765