https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94338
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2020-03-26 --- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- Sounds like there's agreement that the code should at least get a warning then, so confirmed. The attribute aligned section of the manual describing the variable attribute says: When used on a struct, or struct member, the aligned attribute can only increase the alignment... It's not clear whether struct here refers to a type or a variable (I'm guessing it's former but it's in the Common Variable Attribute section so it could easily be read as the latter). Either way, reducing the alignment of an object whose members explicitly ask for stricter alignment seems like a dangerous thing to do without a warning. I'll see if I can do this for GCC 11.