This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]