Bitfield questions
David Greene
greened@eecs.umich.edu
Mon Mar 8 14:22:00 GMT 1999
What are the bitfield layout rules for egcs under Linux?
They don't appear to follow the i386 System V ABI as far
as I can tell.
For example, in the following struct:
struct baz { unsigned int a:2, b:4, c:32;} y;
c appears to be placed immediately after b rather than
including 3 bytes of padding to align it on an integer
boundary.
Also, when bitfields are declared without qualifiers,
egcs treats them as signed when the ABI standard indicates
they should be unsigned.
Is there a description of how bitfields work in egcs?
Please correct any misconceptions I have about either egcs
or the SysV ABI standard.
Thanks!
-Dave
More information about the Gcc
mailing list