[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Packing of union fields and bool_bf
From: |
Paul Eggert |
Subject: |
Re: Packing of union fields and bool_bf |
Date: |
Sat, 13 Oct 2018 11:22:31 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 10/13/2018 10:58 AM, Tom Tromey wrote:
> From
> https://docs.microsoft.com/en-us/cpp/c-language/padding-and-alignment-of-structure-members?view=vs-2017:
>
> Adjacent bit fields are packed into the same 1-, 2-, or 4-byte
> allocation unit if the integral types are the same size
It's silly to require the integral types to be the same size, since the
actual size is given by the number of bits in the bitfield. But if it's
the Microsoft API we can't change it. Does the attached patch work
around the problem?
emacs.diff
Description: Text Data