[Bug c++/79301] With -Werror=pedantic outside C++17 mode, __has_cpp_attribute(fallthrough) is nonzero but [[fallthrough]] fails

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 8 03:13:00 GMT 2017


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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-02-08
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Interesting.  I'm not sure about how this would work with -Wpedantic
-Wno-error=pedantic.  I don't think there is a precedent for tying the behavior
of language features (or feature test macros) to -Werror settings.  I do agree,
though, that having the built-in return an affirmative result only to have the
compiler reject the feature seems to run counter to its intended purpose.  I'll
confirm this if only to see what others think.


More information about the Gcc-bugs mailing list