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: "david at doublewise dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 14 Jul 2012 15:14:13 +0000
- Subject: [Bug c/7652] -Wswitch-break : Warn if a switch case falls through
- Auto-submitted: auto-generated
- References: <bug-7652-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652
--- Comment #12 from David Stone <david at doublewise dot net> 2012-07-14 15:14:13 UTC ---
However, I think it's important to note that they implement the very noisy
behavior of warning for all implicit fall-through. We could make our warning
much more useful by being silent for empty case statements, and in light of
other warnings starting with -Wswitch, I would recommend we name the warning
-Wswitch-fall-through or something similar. If we want to have an additional
warning that warns for all fall-through, as clang does, we could also add
-Wswitch-empty-fall-through.