https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92562
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|UNCONFIRMED |NEW Last reconfirmed| |2019-11-19 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- GCC already allows it. It's only rejected by GCC because you asked for it to be rejected by GCC, by using -Werror. Please don't use -Werror when reporting bugs about warnings, it just confuses things. Your report is about a warning, not a error, so if you want a better response than "stop using -Werror" or "use "-Wno-error=attributes" then don't use -Werror here. A correct report would be that GCC **warns** for this code, and you don't want it to. I'll confirm it for that, since ignoring it in this case seems harmless (and is useful for compatibility with Clang).