[Bug c++/79301] With -Werror=pedantic outside C++17 mode, __has_cpp_attribute(fallthrough) is nonzero but [[fallthrough]] fails
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 15 17:11:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79301
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Feb 15 17:10:40 2017
New Revision: 245489
URL: https://gcc.gnu.org/viewcvs?rev=245489&root=gcc&view=rev
Log:
PR c++/79301
* parser.c (cp_parser_std_attribute): Don't pedwarn about
[[deprecated]] with -std=c++11 and [[fallthrough]] with
-std=c++11 and -std=c++14.
* g++.dg/cpp1y/feat-cxx11-neg.C: Remove (with pedwarn) from
[[deprecated]] comment.
* g++.dg/cpp1y/feat-cxx98-neg.C: Likewise.
* g++.dg/cpp1y/feat-cxx11.C: Likewise.
* g++.dg/cpp1y/attr-deprecated-neg.C: Don't expect warnings for
[[deprecated]] in -std=c++11.
* g++.dg/cpp0x/fallthrough2.C: Don't expect warnings for
[[fallthrough]] in -std=c++11 and -std=c++14.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp0x/fallthrough2.C
trunk/gcc/testsuite/g++.dg/cpp1y/attr-deprecated-neg.C
trunk/gcc/testsuite/g++.dg/cpp1y/feat-cxx11-neg.C
trunk/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C
trunk/gcc/testsuite/g++.dg/cpp1y/feat-cxx98-neg.C
More information about the Gcc-bugs
mailing list