[PATCH] Microsoft Bitfields and VBases

Warren Hunt whunt at google.com
Tue Nov 5 16:53:10 PST 2013


E does not get padding, F does.  even:
struct G : virtual B0 { char a, b, c, d : 8; }
gets padding.


On Tue, Nov 5, 2013 at 3:13 PM, Richard Smith <richard at metafoo.co.uk> wrote:

> On Tue, Nov 5, 2013 at 3:13 PM, Richard Smith <richard at metafoo.co.uk>wrote:
>
>>
>>   Oh wow. That's ... weird. Patch LGTM.
>>
>>
>> ================
>> Comment at: test/Layout/ms-x86-bitfields-vbases.cpp:61
>> @@ +60,3 @@
>> +
>> +struct D : virtual B0 { char a : 1; char b; };
>> +
>> ----------------
>> What happens for:
>>
>>   struct E : virtual B0 { char a, b, c, d : 4, e : 4, : 0; };
>>
>
> ... and also
>
>   struct F : virtual B0 { char a, b, c, d : 4, e : 4; };
>
>
>> ? Do we get extra padding?
>>
>>
>> http://llvm-reviews.chandlerc.com/D2103
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131105/381db88f/attachment.html>


More information about the cfe-commits mailing list