https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114955
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|WAITING |RESOLVED --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >We set pragma pack(1) hope the address of variable (also first member of >struct) with struct A type align to 1. But that is not what #pragma pack is documented doing. You need to use an explicit align attribute (or _Align or alignas [which is the portable way of doing it for C11 and C++11]).