On Apr 26 2020, Doug McIlroy via Gcc wrote:
> What was the rationale for the gcc ABI convention that int
> bit fields force the containing struct to be int-aligned?
See PCC_BITFIELD_TYPE_MATTERS in the GCC internals documentation.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key finge
* Doug McIlroy via Gcc:
> What was the rationale for the gcc ABI convention that int
> bit fields force the containing struct to be int-aligned?
>
> For example, the size of struct{int x:2;} is 4 in Linux
> gcc, completely wasting 3 out of every 4 bytes of memory.
I'm pretty sure that this follow
What was the rationale for the gcc ABI convention that int
bit fields force the containing struct to be int-aligned?
For example, the size of struct{int x:2;} is 4 in Linux
gcc, completely wasting 3 out of every 4 bytes of memory.
One can get finer alignment by declaring small fields
to be char,