[Issue 9931] Mac OS X ABI not followed when returning structs for extern (C)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 23 17:56:12 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9931



--- Comment #19 from Martin Nowak <code at dawg.eu> 2013-04-23 17:56:10 PDT ---
(In reply to comment #18)
> If it's not clear, this issue happens for both 32 and 64bit.
> 
> Also, if I implement the C function in D with extern (C) it won't segfault.
> This would indicate that DMD does something wrong in this case as well.

It doesn't do anything wrong, it just sets EAX to contain the hidden pointer
before returning. This is required by the SysV IA-32 ABI but apparently not on
OSX.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list