[Bug c++/79301] With -Werror=pedantic outside C++17 mode, __has_cpp_attribute(fallthrough) is nonzero but [[fallthrough]] fails
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 8 21:33:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79301
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> That said, I think e.g. for maybe_unused or nodiscard attributes we don't
> complain with -pedantic about those attributes used in C++14 code, so either
> we should do that as well, or we shouldn't do that for fallthrough either.
> Jason?
We certainly don't want to both have __has_cpp_attribute(fallthrough) non-zero
and also complain about its usage. My inclination would be to remove the
diagnostic.
More information about the Gcc-bugs
mailing list