This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct


Hi,

On Thu, 11 Feb 2016, H.J. Lu wrote:

> 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 { };

I think this is covered by the above points.  But without further 
restriction I don't see how e.g. the above example with ctors and dtors 
would be ruled out (except if you regard a ctor as a sub-object).  For 
that you seem to need trivially-copyable, or that POD-ly thing.  So, 
perhaps simply amend (2) "... is a trivially copyable type where it ...".


Ciao,
Michael.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]