[Issue 16525] New: C++ member variables have no mangling
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Sep 22 05:00:58 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16525
Issue ID: 16525
Summary: C++ member variables have no mangling
Product: D
Version: D2
Hardware: All
OS: Linux
Status: NEW
Keywords: ice
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: code at dawg.eu
cat > bug.d << CODE
static immutable templ(alias var) = 1234;
struct D
{
int memvar;
}
extern(C++) struct CPP
{
int memvar;
}
void test()
{
pragma(msg, templ!(D.memvar));
pragma(msg, templ!(CPP.memvar));
pragma(msg, CPP.memvar.mangleof); // root cause
}
CODE
dmd -c bug
----
bug.d(10): Error: variable bug.CPP.memvar Internal Compiler Error: C++ static
non- __gshared non-extern variables not supported
----
Not sure if C++ defines a member variable mangling, but we need it at a couple
of places and it's blocking issue 16513.
--
More information about the Digitalmars-d-bugs
mailing list