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

Nathan Sidwell nathan at codesourcery.com
Fri Aug 23 08:38:52 UTC 2002


Mark Mitchell wrote:

> 2) Should padding be at the bit-field level, or only at the byte level?
> 
>    For example, given:
> 
>      struct A { virtual void f(); int i : 3; };
>      struct B : public A { int j: 2; };

>    Therefore, I believe the spec should be changed to clarify that --
>    while the bytes following A::i are OK for use as padding -- the byte
>    containing A::i is not.  (And, of course, GCC should be fixed.)
You haven't mentioned
	struct A { virtual void f(); int i : 3; };
	struct C { A a; int j: 2; };
which should have the same layout as B. g++, intel & hp get this wrong.

nathan

-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan at codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan at acm.org



More information about the cxx-abi-dev mailing list