extern(C) names are being mangled; that's crazy, Walter says I'm crazy
sarn
sarn at theartofmachinery.com
Wed Jul 24 09:57:16 UTC 2019
On Wednesday, 24 July 2019 at 06:25:50 UTC, Mike Franklin wrote:
> 1. `pragma(mangle)` should come in more forms.
> a. `pragma(mangle, C)` will mangle according to C rules
> b. `pragma(mangle, C++)` will mangle according to C++ rules
> c. `pragma(mangle, D)` will mangle according to D rules
> d. `pragma(mangle, "foo")` will mangle explicitly
>
> 2. `extern` should default the mangling to one of the above
> a. `extern(C)` should mean `extern(C) pragma(mangle, C)`
> b. `extern(C++)` should mean `extern(C++) pragma(mangle, C++)`
> c. `extern(D)` should mean `extern(D) pragma(mangle, D)`
Yeah. Walter's approach is the only one that works well without
a pragma(mangle, D), but I think pragma(mangle, D) is a better
idea.
More information about the Digitalmars-d
mailing list