[Issue 23567] New: pragma(printf) messes up with the vtable of extern(C++) classes
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 18 16:12:00 UTC 2022
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: nobody at puremagic.com
Reporter: naydef at abv.bg
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
--
More information about the Digitalmars-d-bugs
mailing list