[Issue 8207] OS X: Should extern(D) symbols include another underscore?
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Apr 21 00:02:20 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=8207
Dan Olson <gorox at comcast.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gorox at comcast.net
--- Comment #2 from Dan Olson <gorox at comcast.net> ---
I would think yes, D symbols emitted to the object file on OS X should have
extra underscore. And .mangleof should produce the symbol without the extra
underscore as it does today.
extern(C++) has opposite problem. The extra underscore is present in object
file (correct) but is also present in .mangleof symbol. It should be stripped
from the .mangleof symbol. Note: ldc merge-2.067 does this now which caused
test compilable/test7030.d to fail, which is how I got here. I think LDC is
correct.
-- demo --
void dfun(int);
extern(C++) void cxxfun(int);
extern (C) void cfun(int);
pragma(msg, dfun.mangleof);
pragma(msg, cxxfun.mangleof);
pragma(msg, cfun.mangleof);
dmd 2.067 produces:
_D10showmangle4dfunFiZv
__Z6cxxfuni
cfun
where obj file has these symbols:
U _D10showmangle4dfunFiZv
U __Z6cxxfuni
U _cfun
--
More information about the Digitalmars-d-bugs
mailing list