]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/testsuite/g++.dg/warn/Wswitch-1.C
Merge tree-ssa-20020619-branch into mainline.
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / warn / Wswitch-1.C
index e9fcb581817661ecf438a669b989698f338c6079..4f44e12576eaea194238babe915f4fe6289ce54a 100644 (file)
@@ -19,17 +19,17 @@ foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el,
     case 4: return 3;
     default: break;
     }
-  switch (ei)
-    { /* { dg-warning "enumeration value `e1' not handled in switch" "enum e1" { target *-*-* } 24 } */
-    } /* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" } */
+  switch (ei) /* { dg-warning "enumeration value `e1' not handled in switch" "enum e1" } */
+    { /* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" { target *-*-* } 22 } */
+    }
   switch (ej)
     {
     default: break;
     }
-  switch (ek)
+  switch (ek) /* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" } */
     {
     case e1: return 1;
-    } /* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" } */
+    }
   switch (el)
     {
     case e1: return 1;
@@ -50,8 +50,8 @@ foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el,
     {
     case e1: return 1;
     case e2: return 2;
-    case 3: return 3;
-    } /* { dg-warning "case value `3' not in enumerated type `e'" "excess 3" } */
+    case 3: return 3; /* { dg-warning "case value `3' not in enumerated type `e'" "excess 3" } */
+    }
   switch (ep)
     {
     case e1: return 1;