RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct
H.J. Lu via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 11 06:46:16 PST 2016
On Thu, Feb 11, 2016 at 6:30 AM, Michael Matz <matz at suse.de> wrote:
> Hi,
>
> On Thu, 11 Feb 2016, Jonathan Wakely wrote:
>
>> On 11 February 2016 at 12:40, Matthijs van Duin wrote:
>> > You never define "POD for the purposes of layout", and I can only
>> > interpret it as being equivalent to "standard-layout".
>>
>> As Richard pointed out, it's defined in the C++ ABI.
>
> Which is C++y as well (and hence doesn't in itself solve the C/C++
> compatibility we should strive for in the ABI). I'll concur with Matthijs
> and think that trivially copyable is the correct distinction for passing
> without registers (in addition of it being clearer than a strangly defined
> concept of "POD-but-not-quite-POD"). Do you think different? Are there
> non-trivially copyable examples that we'd wish to pass without registers
> as well?
>
>
Any suggestions on new wording, something like
1. "class type". A class type is a structure, union or C++ class.
2. "empty type". An empty type is a type where it and all of its
subobjects are of class or array type.
Does it cover
struct A { };
struct B { };
struct C : A, B { };
--
H.J.
More information about the cfe-commits
mailing list