summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wswitch-enum.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/Wswitch-enum.c')
-rw-r--r--gcc/testsuite/gcc.dg/Wswitch-enum.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/testsuite/gcc.dg/Wswitch-enum.c b/gcc/testsuite/gcc.dg/Wswitch-enum.c
index d031b12ce14..b51ecfdcc9e 100644
--- a/gcc/testsuite/gcc.dg/Wswitch-enum.c
+++ b/gcc/testsuite/gcc.dg/Wswitch-enum.c
@@ -22,19 +22,19 @@ foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el,
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)
- { /* { dg-warning "enumeration value `e1' not handled in switch" "enum e1" { target *-*-* } 28 } */
+ switch (ej) /* { dg-warning "enumeration value `e1' not handled in switch" "enum e1" } */
+ { /* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" { target *-*-* } 25 } */
default: break;
- } /* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" } */
- 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)
+ }
+ switch (el) /* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" } */
{
case e1: return 1;
default: break;
- } /* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" } */
+ }
switch (em)
{
case e1: return 1;
@@ -50,14 +50,14 @@ 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;
case e2: return 2;
- case 3: return 3;
+ case 3: return 3; /* { dg-warning "case value `3' not in enumerated type `e'" "excess 3" } */
default: break;
- } /* { dg-warning "case value `3' not in enumerated type `e'" "excess 3" } */
+ }
return 0;
}