PING^1: [PATCH] Add TYPE_EMPTY_RECORD for C++ empty class

Joseph Myers joseph@codesourcery.com
Tue Mar 15 22:35:00 GMT 2016


On Tue, 15 Mar 2016, H.J. Lu wrote:

> On Tue, Mar 15, 2016 at 2:39 PM, Joseph Myers <joseph@codesourcery.com> wrote:
> > I'm not sure if the zero-size arrays (a GNU extension) are considered to
> > make a struct non-empty, but in any case I think the tests should cover
> > such arrays as elements of structs.
> 
> There are couple tests for structs with members of array
> of empty types.  testsuite/g++.dg/abi/empty14.h has

My concern is the other way round - structs with elements such as 
"int a[0];", an array [0] of a nonempty type.  My reading of the subobject 
definition is that such an array should not cause the struct to be 
considered nonempty (it doesn't result in any int subobjects).

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list