testsuite: Fix Wimplicit-fallthrough-20.c.
authorMarek Polacek <polacek@redhat.com>
Sat, 7 Nov 2020 18:28:21 +0000 (13:28 -0500)
committerMarek Polacek <polacek@redhat.com>
Sat, 7 Nov 2020 18:28:43 +0000 (13:28 -0500)
The r11-4813 patch removed "ignored" from the dg-warnings in this test,
causing this test to fail when compiled as C++.

gcc/testsuite/ChangeLog:

* c-c++-common/Wimplicit-fallthrough-20.c: Adjust dg-warning.

gcc/testsuite/c-c++-common/Wimplicit-fallthrough-20.c

index 810c331b19a4b7083467eaa1495854a5add7dd7e..bc0cd0fe58014e7ad0e7df57eb6df29c466c786d 100644 (file)
@@ -27,13 +27,13 @@ g (int i)
   switch (i)
     {
     case -1:
-      __attribute__((used)); /* { dg-warning "empty declaration" } */
+      __attribute__((used)); /* { dg-warning "empty declaration|ignored" } */
     default:
-      __attribute__((used)); /* { dg-warning "empty declaration" } */
+      __attribute__((used)); /* { dg-warning "empty declaration|ignored" } */
     case 1:
       return 6;
     case 2 ... 4:
-      __attribute__((used)); /* { dg-warning "empty declaration" } */
+      __attribute__((used)); /* { dg-warning "empty declaration|ignored" } */
     case 5:
       return 7;
     }