Bug 43250 - Warning for missing break in switch statement
Summary: Warning for missing break in switch statement
Status: RESOLVED DUPLICATE of bug 7652
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: unknown
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-03 19:14 UTC by Eugene Zelenko
Modified: 2010-03-04 20:48 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Zelenko 2010-03-03 19:14:48 UTC
I think will be good idea to have warning (and command line option to turn it on/off) to report missing break in switch statement.

Sure syntax is valid, but I think missed breaks are occurring more often then intentionally skipped ones.

Same goes for C++ and other languages where similar problem could exist.
Comment 1 Andrew Pinski 2010-03-04 20:48:19 UTC

*** This bug has been marked as a duplicate of 7652 ***