Adam Nemet <ane...@caviumnetworks.com> writes: > struct s > { > char a:4; > char b:8; > char c:4; > } __attribute__ ((packed)) > > is 3 bytes long because b gets pushed to the next byte boundary.
Sounds like a bug. > The reason for this behavior is that finish_struct does not propagate packed > to fields whose type has alignment <= BITS_PER_UNIT: This was introduced for PR 21166. I think you're right that the alignment check should be ignored if the bitfield is a bitfield. Ian