Walter: D asm syntax not consistent nor calling convention with C++

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 16 23:23:34 PDT 2016


On 7/16/2016 11:10 PM, Adam Sansier wrote:
> D is not consistent with C++ in asm and calling convention.

In general, it is a *lot* easier to debug inline asm issues if you're willing to 
run obj2asm on the output and compare. No need to run a debugger on a crashing 
program.

And you're right that D has a different calling convention than C++. The 
solution to that is declare the function in the D code as 'extern (C++)'.


More information about the Digitalmars-d mailing list