C++/C mangleof inconsistency for OS X
Dan Olson via Digitalmars-d
digitalmars-d at puremagic.com
Thu Apr 23 10:15:37 PDT 2015
Iain Buclaw via Digitalmars-d <digitalmars-d at puremagic.com> writes:
>
> (FYI - last time I checked GDC goes ahead and applied target-specific
> mangling on-top of pragma(mangle). So you can relax and assume
> nothing about the target).
So does LDC.
Actually, DMD does too on OS X, but only for extern(C) - attention to
func plughc.
pragma(mangle, "plughc") extern (C) void plughc();
pragma(mangle, "plughd") extern(D) void plughd();
pragma(mangle, "plughcxx") extern(C++) void plughcxx();
pragma(msg, plughc.mangleof);
pragma(msg, plughd.mangleof);
pragma(msg, plughcxx.mangleof);
$ dmd -c showmangle.d
plughc
plughd
plughcxx
$ nm showmangle.o | grep plugh
U _plughc
U plughcxx
U plughd
Maybe this all needs to be left in implementation defined land?
More information about the Digitalmars-d
mailing list