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: [email protected]
Reporter: [email protected]
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.
--