re PR c++/79301 (With -Werror=pedantic outside C++17 mode, __has_cpp_attribute(fallth...
authorJakub Jelinek <jakub@redhat.com>
Wed, 15 Feb 2017 17:10:40 +0000 (18:10 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 15 Feb 2017 17:10:40 +0000 (18:10 +0100)
commite72028574f776fd5b73de8b974e4ea2d085f1532
tree741f2855ba78ee73ac193fa675fb1641b6262fa6
parent4f5e5fcba8a9cbabb0e05f9cb753b549396bc2de
re PR c++/79301 (With -Werror=pedantic outside C++17 mode, __has_cpp_attribute(fallthrough) is nonzero but [[fallthrough]] fails)

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.

From-SVN: r245489
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/fallthrough2.C
gcc/testsuite/g++.dg/cpp1y/attr-deprecated-neg.C
gcc/testsuite/g++.dg/cpp1y/feat-cxx11-neg.C
gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C
gcc/testsuite/g++.dg/cpp1y/feat-cxx98-neg.C