https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108342
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #5) > I don't know whether clang allows packing non-PODs, or just doesn't ever > warn for them, or has a special case for std::complex, or does something > smarter like not warn for types that have no padding bytes anyway (so that > packing them would be a no-op). clang allows packing of non-PODs: ``` class f { public: f(); private: int t[2]; }; typedef struct __attribute__((__packed__)) { /** Every frame starts with BB_FRAME_MAGIC. */ unsigned magic; unsigned char t; f bb_iq_samples[100]; } bb_frame_t; ```