[cxx-abi] [cxx-abi-dev] Tail padding, in sumary

Nelson, Clark clark.nelson at intel.com
Fri Aug 23 00:24:53 UTC 2002


> 3) Should virtual bases be handled differently than non-virtual bases?
> 
>    For example, given:
> 
>      struct A { virtual void f(); char c1; };
>      struct B { B(); char c2; };
>      struct C : public A, public virtual B {};
> 
>    Is B supposed to be packed into the tail-padding of A?  In the case
>    that it is non-virtual, it is.  However, in the virtual 
> case GCC does
>    not reuse the tail-padding.
> 
>    Probably, this is also a GCC bug, but I would like to know what HP
>    and Intel do.
> 
>    HP, Intel?

Our compiler considers the sizes of A and C both to be 8, so we reuse the
tail-padding for virtual bases.

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



More information about the cxx-abi-dev mailing list