public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/7652: -Wswitch-break : Warn if a switch case falls through
@ 2002-08-20 7:36 ac131313
0 siblings, 0 replies; only message in thread
From: ac131313 @ 2002-08-20 7:36 UTC (permalink / raw)
To: gcc-gnats
>Number: 7652
>Category: c
>Synopsis: -Wswitch-break : Warn if a switch case falls through
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Aug 20 07:36:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: ac131313@redhat.com
>Release: unknown-1.0
>Organization:
>Environment:
>Description:
Suggest a new -Wswitch variant, -Wswitch-break that warns
when one switch statement falls through to the next one vis:
case (foo)
{
case 1: case 2:
printf ("case 1 and 2\n");
break;
case 3: case 4:
printf ("case 3 and case 4\n");
case 5:
printf ("case 5 (and fallthrough for cases 3 and 4\n");
}
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-08-20 14:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-20 7:36 c/7652: -Wswitch-break : Warn if a switch case falls through ac131313
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).