http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652

--- Comment #9 from Eric Smith <eric at brouhaha dot com> 2012-02-21 01:04:18 
UTC ---
Or, instead of a pragma as I proposed in me previous comment, the warning would
be avoided by using a goto to the next case label.  Updated version of the
example from the first comment, which would not trip the warning:

case (foo)
  {
  case 1: case 2:
    printf ("case 1 and 2\n");
    break;
  case 3: case 4:
    printf ("case 3 and case 4\n");
    goto 5;
  case 5:
    printf ("case 5 (and fallthrough for cases 3 and 4\n");
}

Reply via email to