<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 8, 2016 at 12:05 PM, H.J. Lu <span dir="ltr"><<a href="mailto:hjl.tools@gmail.com" target="_blank">hjl.tools@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Feb 8, 2016 at 11:33 AM, Jonathan Wakely <<a href="mailto:jwakely.gcc@gmail.com">jwakely.gcc@gmail.com</a>> wrote:<br>
> On 8 February 2016 at 19:23, Richard Smith wrote:<br>
>> "POD for the purpose of layout" is defined in the Itanium C++ ABI here:<br>
>><br>
>> <a href="http://mentorembedded.github.io/cxx-abi/abi.html#definitions" rel="noreferrer" target="_blank">http://mentorembedded.github.io/cxx-abi/abi.html#definitions</a><br>
><br>
> Thanks. So there's no problem using "POD for the purposes of layout",<br>
> and the change to "POD for the purpose of standard-layout" was<br>
> unnecessary and just confused things.<br>
<br>
</div></div>Here is the revised proposal:<br>
<span class=""><br>
1. "class type". A class type is a structure, union or C++ class.<br>
2. "empty class type". An empty class type is:<br>
a. A class type without member. Or<br>
b. A class type with only members of empty class types. Or<br></span></blockquote><div><br></div><div>(a) is a special case of (b).</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
c. An array of empty class types.<br></span></blockquote><div><br></div><div>It seems confusing to call an array a class type. Instead, how about:</div><div><br></div><div> 2. An empty type is either an array of empty types or a class type where every member is of empty type.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
</span>3. "empty record". An empty record is Plain Old Data (POD) for the<br>
purposes of layout and<br>
<span class="im HOEnZb"> a. A class type without member. Or<br>
b. A class type with only members of empty class types.<br></span></blockquote><div><br></div><div>(a) is a special case of (b).</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="im HOEnZb">
</span><div class="HOEnZb"><div class="h5">4. No memory slot nor register should be used to pass or return an object<br>
of empty record.</div></div></blockquote><div><br></div><div>Objects of array type are never passed or returned (but if through some language extension they were, we'd want this rule to apply). So you don't need rule 3 and this can be just:</div><div><br></div><div> 3. No memory slot nor register should be used to pass or return an object of empty type.</div></div></div></div>