https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52981
--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to krux from comment #6) > (In reply to Manuel López-Ibáñez from comment #4) > > This is quite easy to implement. > > It's not as trivial as one might think. > There's some copy-paste code to disable the flag in various places (instead > of handling it inside if possible). You can still have a global -Wpadded that implies the two new warning options and only warn, for example, if warn_padded && warn_packed_size are both true. Even better would be to mark these types as internal/ARTIFICIAL, look for all places where OPT_Wpadded is used and, if not already done, avoid warning for anything internal /ARTIFICIAL, then remove this hack. This should require no major surgery in the compiler nor any deep knowledge about the code.