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

--- Comment #22 from Matthew Woehlke <mw_triad at users dot sourceforge.net> ---
Thanks for the patch. However, one thing I am not seeing is an easy way to
suppress the warning for a specific occurrence (a la [[clang:fallthrough]]).
Can that be added also? (Or is it there and I miss something?)

Ideally this would work like:

switch (expr)
{
  case A:
    // empty body, no warning
  case B:
    ...
    [[gcc:fallthrough]] // suppress warning for fall-through to 'case C'
  case C:
    ...
    break;
  case D:
    ...
    // will warn here
  default:
    ...
    break;
}

Reply via email to