This is the mail archive of the gcc-patches@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: PING^1: [PATCH] Add TYPE_EMPTY_RECORD for C++ empty class


On 01/27/2016 10:39 AM, H.J. Lu wrote:
Here is the updated patch with new testcases.  OK for trunk?

This is not a complete patch.

Please update type_is_empty_record_p to use the definition from the recent discussion:

An empty type is a type where it and all of its subobjects (recursively)
are of class, structure, union, or array type.

This shouldn't need to rely on the front-end setting a flag. Be sure to ignore unnamed bit-fields, as they are not subobjects.

I would also suggest having this function abort if the type is TREE_ADDRESSABLE.

Jason


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