PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
[official-gcc.git] / gcc / testsuite / g++.dg / warn / switch1.C
blob49c17e9120c017e2c90eb955613113dbad93dc92
1 // { dg-do compile { target { int32plus } } }
3 signed char sc;
5 void
6 foo (void)
8   switch (sc)
9     {
10     case 1:
11     case 2 * __SCHAR_MAX__ + 3:         // { dg-warning "case label value exceeds maximum" }
12     case - 2 * __SCHAR_MAX__ - 1:       // { dg-warning "case label value is less than minimum" }
13       break;
14     }