This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/7652] -Wswitch-break : Warn if a switch case falls through
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 16 Jun 2016 11:28:24 +0000
- Subject: [Bug c/7652] -Wswitch-break : Warn if a switch case falls through
- Auto-submitted: auto-generated
- References: <bug-7652-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652
--- Comment #44 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
FYI, I have got a candidate patch, but the trouble comes with code such as
case 1:
if (x)
bar (); // warn here
else
{
bar ();
return;
}
case 0:
so this is going to require more thinking & tinkering. :/