https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82914
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|RESOLVED |ASSIGNED Last reconfirmed| |2018-02-02 CC| |msebor at gcc dot gnu.org Resolution|INVALID |--- Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> --- (In reply to Paul Eggert from comment #4) > Here, GCC says the alignment of 'b' is 1, not 8. What happened to the > attribute? GCC silently drops it, without validating it. For instance, this is accepted as well: struct s { char mem; }; struct __attribute__ ((foobar)) s b; I view it as a bug. At a minimum, GCC should point out that it's ignoring the attribute like other compilers do, such as Clang: warning: unknown attribute 'foobar' ignored [-Wunknown-attributes] I happened to notice this bug while testing a fix for pr84108. It seems that a simple fix is fairly straightforward so hopefully Richard won't be offended if I reopen this bug, assign it to myself, and submit my patch in stage 1 of GCC 9.