2 /* { dg-do compile } */
3 /* { dg-options "-Wimplicit-fallthrough" } */
7 /* Test nested scopes. */
26 int j
= 10; /* { dg-warning "statement may fall through" } */
40 j
++; /* { dg-warning "statement may fall through" } */
57 bar (1); /* { dg-warning "statement may fall through" } */
71 __attribute__((fallthrough
));
85 __attribute__((fallthrough
));
120 { /* { dg-warning "statement may fall through" "" { target c } } */
125 } /* { dg-warning "statement may fall through" "" { target c++ } } */
148 { /* { dg-warning "statement may fall through" "" { target c } } */
155 } /* { dg-warning "statement may fall through" "" { target c++ } } */
169 bar (2); /* { dg-warning "statement may fall through" } */
178 { /* { dg-warning "statement may fall through" "" { target c } } */
185 } /* { dg-warning "statement may fall through" "" { target c++ } } */
282 { /* { dg-warning "statement may fall through" "" { target c } } */
285 } /* { dg-warning "statement may fall through" "" { target c++ } } */
300 __attribute__((fallthrough
));