https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109824
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|aligned attribute lost on |aligned attribute lost when |first usage |using it on a typedef of a | |struct if there was not an | |usage of the struct | |beforehand Keywords| |accepts-invalid, wrong-code --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Right, the error message is correct when using it before hand; the alignment attribute is there. In the case of the used struct not used before hand, the alignment is lost. This is the opposite of what you wrote even. You thought it was being lost if there was an use before hand, rather the alignment is correct then.