[Issue 16243] wrong C++ argument passing with empty struct and 6 integers

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Sep 11 21:24:24 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16243

Martin Nowak <code at dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |braddr at puremagic.com

--- Comment #7 from Martin Nowak <code at dawg.eu> ---
(In reply to kinke from comment #4)
> clang doesn't pass empty structs at all for 32-bit, while GCC does. We have
> such a special case in LDC too for 32-bit OSX, where we assume clang, but
> not for 32-bit Linux, where we assume GCC. See
> https://github.com/ldc-developers/ldc/blob/master/gen/abi-x86.cpp#L214.

Thanks, assuming clang by default on OSX indeed seems like a reasonable
solution.
We also have that issue with GCC5's C++ ABI change
(http://developers.redhat.com/blog/2015/02/05/gcc5-and-the-c11-abi/), so
detecting the actual compiler might be helpful as well.

(In reply to Jacob Carlborg from comment #6)
> There's a long time since Apple switched to Clang. GCC is dead on Apple
> platforms. I've mentioned this several times that the autotester should
> switch to Clang.

Yes, would be good if we updated the auto-testers to use clang @Brad.

--


More information about the Digitalmars-d-bugs mailing list