[Bug c/79152] -Wimplicit-fallthrough false positive triggered by goto statements
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 20 13:28:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79152
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think the problem is that
1988 /* Don't warn for a non-case label followed by a statement:
1989 case 0:
1990 foo ();
1991 label:
1992 bar ();
1993 as these are likely intentional. */
1994 if (!case_label_p (&gimplify_ctxp->case_labels, label))
1995 {
1996 gsi_next (&gsi);
1997 if (gsi_end_p (gsi) || gimple_code (gsi_stmt (gsi)) !=
GIMPLE_LABEL)
1998 return false;
1999 }
doesn't handle consecutive non-case labels.
More information about the Gcc-bugs
mailing list