extern(C) names are being mangled; that's crazy, Walter says I'm crazy

Patrick Schluter Patrick.Schluter at bbox.fr
Fri Jul 26 12:55:10 UTC 2019


On Wednesday, 24 July 2019 at 23:05:33 UTC, Walter Bright wrote:
> On 7/24/2019 2:24 PM, Manu wrote:
>> In that callback case, they're effectively anonymously named
>> functions...
>
> Yet they are given a name, and extern(C) to get the right 
> calling convention.

I think the issue here is one of definitions and I think I 
understand why Walter and Manu do not understand each others 
point.

For Manu  extern(?) is mostly about mangling and secondarily 
about calling convention.
For Walter, its first and foremost about calling convention. The 
mangling being unimportant as it can be explicitly set with 
mangle.

When looking at what the specs says [1] it's clear that extern is 
more about calling conventions than mangling

[1]: https://dlang.org/spec/attribute.html#linkage


More information about the Digitalmars-d mailing list