[Bug c++/86368] an unknown [[attribute]] should not trigger a warning in C++17

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 2 19:45:00 GMT 2018


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It might be reasonable for GCC to silently ignore attributes that use an
unrecognized attribute-namespace. If somebody uses [[clang::foobar]] or
[[acme::rocketboots]] they probably aren't expecting GCC to handle it.

This could mean silently ignoring typos like [[ngu::unused]] but it's arguably 
easier to spot a typo like "ngu" than to spot "warn_unsued_result" or
"alwasy_inlne".


More information about the Gcc-bugs mailing list