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

Dan Olson <go...@comcast.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |go...@comcast.net

--- Comment #2 from Dan Olson <go...@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

--

Reply via email to