"Daniel Murphy" <[email protected]> writes: > "Jacob Carlborg" wrote in message > news:[email protected]... > >> And what about pragma(mangle), should that output the symbol name >> completely untouched? > > Yes.
Then for systems that add underscore prefix to compiler identifiers, dmd .mangleof for extern(C) identifiers needs to include '_' prefix. I'll try this locally on OS X and see what breaks. It also means ldc merge-2.067, which just got C++ object symbols correct with https://github.com/ldc-developers/ldc/pull/889, also needs to include '_' prefix in .mangleof result for extern(C++). There should be some helper to determine if compiler will add underscores. Otherwise I can see some unittests getting ugly.
