[cxx-abi] Re: [cxx-abi-dev] Question about tail padding

Nelson, Clark clark.nelson at intel.com
Thu Aug 22 18:07:45 UTC 2002


> > g++ 3.2 reports (i686)
> > A 8 bytes
> > B 8 bytes
> > C 12 bytes
> >
> > B & C should have the same layout AFAICT from the ABI.
> 
> Yes.  The intent was certainly that B have 12 bytes, like C; 
> otherwise,
> as Scott pointed out it is impossible to create efficient copy
> constructors and such.
> 
> Again, what to HP and Intel do?

Intel (7.0 beta) reports the same sizes as g++ 3.2.

The problem Scott pointed out was about packing bit-fields from derived and
base classes into the same byte. Intel's compiler doesn't do that. We
instead wind up with the bit-field in the derived class in a poorly-aligned
container, which is a smaller performance problem.

--
Clark Nelson
Intel Corporation
clark.nelson at intel.com
 



More information about the cxx-abi-dev mailing list