]>
gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/c-c++-common/Wimplicit-fallthrough-6.c
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 } 120 } */
124 return; /* { dg-warning "statement may fall through" "" { target c++ } 124 } */
148 { /* { dg-warning "statement may fall through" "" { target c } 148 } */
154 return; /* { dg-warning "statement may fall through" "" { target c++ } 154 } */
169 bar (2); /* { dg-warning "statement may fall through" } */
178 { /* { dg-warning "statement may fall through" "" { target c } 178 } */
184 bar (2); /* { dg-warning "statement may fall through" "" { target c++ } 184 } */
282 { /* { dg-warning "statement may fall through" "" { target c } 282 } */
284 switch (j
); /* { dg-warning "statement may fall through" "" { target c++ } 284 } */
300 __attribute__((fallthrough
));
This page took 0.052018 seconds and 5 git commands to generate.