[Bug c++/86243] unknown attributes causing hard error

h2+bugs at fsfe dot org gcc-bugzilla@gcc.gnu.org
Wed Jun 20 16:01:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86243

--- Comment #2 from Hannes Hauswedell <h2+bugs at fsfe dot org> ---
(In reply to Jonathan Wakely from comment #1)
> (In reply to Hannes Hauswedell from comment #0)
> > Note that I am not even setting -Wall or -Wextra.
> 
> As documented, -Wattributes is enabled by default and you need to use
> -Wno-attributes to disable it.

Hm, IMHO this could maybe be reconsidered now that attributes are a
standardised feature of the language and the standard explicitly states:
"Any attribute-token that is not recognized by the implementation is ignored."
I think this was added precisely to make upgrades to new attributes seamless
and to support different platform-specific ones. This is not the case if they
produce warnings, especially by default.

BUT this bug report is primarily about the error and not the warning!


More information about the Gcc-bugs mailing list