C++/C mangleof inconsistency for OS X
Michel Fortin via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 22 10:59:58 PDT 2015
On 2015-04-22 16:32:55 +0000, Dan Olson <zans.is.for.cans at yahoo.com> said:
> Since the compile chain knows whether the target system prepends an
> underscore, I wonder if it can be bubbled up into some compiler trait or
> version that prevents writing versioned code based on system. I think
> it would help gdc much as it has many targets, and many prepend
> underscore to symbols. It would help with unittests like
> compilable/cppmangle.d that would have to be tailored for every OS.
> that uses gcc3 style C++ mangling.
And you think it's safe to assume all symbols on OS X will always have
an underscore as a prefix just because symbols for C and C++ stuff do?
(Hint: some Objective-C symbols don't start with "_".)
--
Michel Fortin
michel.fortin at michelf.ca
http://michelf.ca
More information about the Digitalmars-d
mailing list