https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127722

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
A sequence of case labels is just one case where we (intentionally) don't warn.
We do say
This warning does not warn when the last statement of a case cannot
fall through, e.g. when there is a return statement or a call to function
declared with the noreturn attribute.  @option{-Wimplicit-fallthrough=}
also takes into account control flow statements, such as ifs, and only
warns when appropriate.
but don't say stuff that is tested in the testsuite, such as
  case 1:
    i++;
  case 2:
    break;
or instead of break; the end of switch body, etc.  The idea behind that is that
asking the user to add break; before case 2: doesn't change anything on the
behavior,
if it falls through, it will break immediately anyway.
So, if we try to document cases where we don't warn, we should document all of
them, not just a further one and leave the rest undocumented.

Reply via email to