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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 17 04:55:39 PDT 2013


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



--- Comment #14 from John Colvin <john.loughran.colvin at gmail.com> 2013-04-17 12:55:37 BST ---
(In reply to comment #12)
> I'm still wondering though:
> 
> * Why does it work on Mac OS X 10.6.3, luck?

http://forum.dlang.org/post/ixoawrwanlopvgzljost@forum.dlang.org

> * Is using a temporary variable in "bar" a safe workaround?

Based on how the codegen changes with adding a temporary variable in linux, it
should be safe. Disassembly from OS X could confirm that.

BUT:

That's only for this particular example, with a particular set of compiler
setting. It's exactly the sort of thing optimisers mess around with. Personally
I would not risk it.

-- 
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