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
Mon Feb 8 12:05:04 PST 2016


On Mon, Feb 8, 2016 at 11:33 AM, Jonathan Wakely <jwakely.gcc at gmail.com> wrote:
> On 8 February 2016 at 19:23, Richard Smith wrote:
>> "POD for the purpose of layout" is defined in the Itanium C++ ABI here:
>>
>>   http://mentorembedded.github.io/cxx-abi/abi.html#definitions
>
> Thanks. So there's no problem using "POD for the purposes of layout",
> and the change to "POD for the purpose of standard-layout" was
> unnecessary and just confused things.

Here is the revised proposal:

1. "class type".  A class type is a structure, union or C++ class.
2. "empty class type".  An empty class type is:
   a. A class type without member.  Or
   b. A class type with only members of empty class types.  Or
   c. An array of empty class types.
3. "empty record".  An empty record is Plain Old Data (POD) for the
   purposes of layout and
   a. A class type without member.  Or
   b. A class type with only members of empty class types.
4. No memory slot nor register should be used to pass or return an object
of empty record.


-- 
H.J.


More information about the cfe-commits mailing list