https://issues.dlang.org/show_bug.cgi?id=23567
Issue ID: 23567
Summary: pragma(printf) messes up with the vtable of
extern(C++) classes
Product: D
Version: D2
Hardware: x86
OS: Linux
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
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
--