------- Comment #1 from rguenth at gcc dot gnu dot org 2005-12-06 13:08 ------- The C standard allows for arbitrary padding in between elements, so this behavior is expected. Use __attribute__((packed)) on the type to get a struct without padding if you need that for whatever reason (it will be slower to access unaligned fields). You can also sort the fields starting with elements with the largest size to minimize required padding.
-- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25274