1 /* { dg-do compile } */ 2 /* { dg-options "-Wimplicit-fallthrough" } */ 3 4 void bar (int); 5 6 void 7 foo (int i) 8 { 9 switch (i) 10 { 11 case 1: 12 bar (1); 13 /* FALLTHROUGH */ 14 case 2: 15 bar (2); /* { dg-warning "statement may fall through" } */ 16 case 3: 17 bar (3); /* { dg-warning "statement may fall through" } */ 18 case 4: 19 bar (4); 20 default: 21 break; 22 } 23 } 24