extern(C) and name mangling

Dave P. dave287091 at gmail.com
Wed Dec 16 15:18:11 UTC 2020


On Wednesday, 16 December 2020 at 06:46:42 UTC, Jacob Carlborg 
wrote:
> On Wednesday, 16 December 2020 at 04:17:13 UTC, Mike Parker 
> wrote:
>
>> However, the D calling convention is defined to be identical 
>> to the C calling convention on the host system for everything 
>> except Windows x86.
>
> That's what's specified, but that's not how DMD actually 
> behaves. DMD passes the arguments in reverse order. That's 
> easily observable by calling a C function with D linkage:

Is this a bug in the spec or in the implementation? How do we get 
this fixed?



More information about the Digitalmars-d-learn mailing list