[Bug c/7652] -Wswitch-break : Warn if a switch case falls through

david at doublewise dot net gcc-bugzilla@gcc.gnu.org
Sat Jul 14 15:15:00 GMT 2012


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.



More information about the Gcc-bugs mailing list