[Issue 15576] New: extern(C++) wrong mangling

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jan 17 21:36:42 PST 2016


https://issues.dlang.org/show_bug.cgi?id=15576

          Issue ID: 15576
           Summary: extern(C++) wrong mangling
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: turkeyman at gmail.com

C++:
namespace ep {
  struct Instance {};
  Instance *s_pInstance = nullptr;
}

D:
extern (C++, ep) {
  struct Instance {}
  extern __gshared Instance* s_pInstance;
}


C++ mangles: ?s_pInstance at ep@@3PEAUInstance at 1@EA
D mangles:   ?s_pInstance at ep@@2PEAUInstance at 1@EA

Notice there is a '2' where a '3' should be.

--


More information about the Digitalmars-d-bugs mailing list