fallthrough2.C: Only expect the warning in C++11 and C++14.

* g++.dg/cpp0x/fallthrough2.C: Only expect the warning in C++11 and
	C++14.

From-SVN: r240619
This commit is contained in:
Marek Polacek 2016-09-29 13:15:21 +00:00 committed by Marek Polacek
parent fa0a064ae8
commit a9087411ad
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2016-09-29 Marek Polacek <polacek@redhat.com>
* g++.dg/cpp0x/fallthrough2.C: Only expect the warning in C++11 and
C++14.
2016-09-29 Martin Liska <mliska@suse.cz>
* objc/execute/construct1.m: New test.

View File

@ -11,7 +11,7 @@ f (int i)
{
case 1:
bar (1);
[[fallthrough]]; // { dg-warning ".fallthrough. is a C\\+\\+17 feature" }
[[fallthrough]]; // { dg-warning ".fallthrough. is a C\\+\\+17 feature" "" { target { ! c++1z } } }
case 3:
bar (1);
[[gnu::fallthrough, gnu::fallthrough]]; // { dg-warning ".fallthrough. attribute specified multiple times" }