[C++0x] contiguous bitfields race implementation

Aldy Hernandez aldyh@redhat.com
Thu May 26 18:28:00 GMT 2011


On 05/26/11 12:24, Jason Merrill wrote:
> I'm afraid I think this is still wrong; the computation of maxbits in
> various places assumes that the bitfield is at the start of the unit
> we're going to access, so given
>
> struct A
> {
> int i: 4;
> int j: 28;
> };
>
> we won't use SImode to access A::j because we're setting maxbits to 28.

No, maxbits is actually 32, because we include padding.  So it's correct 
in this case.



More information about the Gcc-patches mailing list