[PATCH] testsuite : __attribute__((fallthrough)) with braces

Seija K. doremylover123@gmail.com
Mon Jun 14 14:06:12 GMT 2021


diff --git a/gcc/testsuite/c-c++-common/attr-fallthrough-2.c
b/gcc/testsuite/c-c++-common/attr-fallthrough-2.c
index e8659e572ca6d..1f3ca4ac37acf 100644
--- a/gcc/testsuite/c-c++-common/attr-fallthrough-2.c
+++ b/gcc/testsuite/c-c++-common/attr-fallthrough-2.c
@@ -48,6 +48,13 @@ fn (int i)
   case 11:
     bar (1);
     __attribute__((fallthrough, unused)); /* { dg-warning "attribute
ignored" } */
+  case 12:
+      { bar (1);
+        __attribute__((fallthrough));
+      }
+  case 13:
+      { bar (1);
+      } __attribute__((fallthrough));
   default:
     bar (99);
   }


More information about the Gcc-patches mailing list