This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79301] With -Werror=pedantic outside C++17 mode, __has_cpp_attribute(fallthrough) is nonzero but [[fallthrough]] fails
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 08 Feb 2017 21:33:15 +0000
- Subject: [Bug c++/79301] With -Werror=pedantic outside C++17 mode, __has_cpp_attribute(fallthrough) is nonzero but [[fallthrough]] fails
- Auto-submitted: auto-generated
- References: <bug-79301-4@http.gcc.gnu.org/bugzilla/>
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.