------- Comment #7 from ebotcazou at gcc dot gnu dot org 2009-03-23 11:47 ------- > I'd like to see this message, which is on by default, for the change > introduced in r132614. I haven't figured out how to determine if the offset > for a field has changed, just the alignment. I'll attach my current patch, > where the message should be "Perhaps the alignment of packed bit-field <x> > has changed in GCC 4.4", which is not terribly useful.
I think that's better (without the "perhaps", the alignment is always changed) than "Offset" because this also can change the padding of the structure: struct s { struct { __attribute__ ((aligned (2))) int d:32; } __attribute__ ((packed)) c; unsigned short int e; }; yields (4, 8) with 4.3.3 and (4, 6) with mainline. This apparently will be so uncommon in C/C++ (packed bit-field with alignment attribute) that I'm not sure sure we need to tune it further. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39514