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

Mark Mitchell mark at codesourcery.com
Fri Aug 23 18:35:48 UTC 2002



--On Friday, August 23, 2002 7:28 PM +0100 Nathan Sidwell <nathan at acm.org> 
wrote:

> Mark Mitchell wrote:
>>
>> > 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.
>>
>> I'm sorry; I didn't understand that to be the case.
>>
>> Intel, HP -- would you please confirm that your compilers pack C::j into
>> the same byte as A::i in this case?
> No they're not doing that. All compilers report sizeof C as 12 bytes,
> leading me to believe they are packing j into bits 0,1 of byte 8.
> (Rather than bits 0,1 of byte 5.)

Ah; I see what you're saying.  If everyone is doing it that way, we should
just change the spec to reflect the way everyone is doing it, so I'll add
that to the list...

--
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com



More information about the cxx-abi-dev mailing list