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: "mw_triad at users dot sourceforge.net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 30 Apr 2014 17:04: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/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652
--- Comment #32 from Matthew Woehlke <mw_triad at users dot sourceforge.net> ---
(In reply to Florian Weimer from comment #30)
> Does this mean that you propose a GCC extension which allows to write this?
>
> goto 5;
> case 5:
While I personally detest this syntax :-), I feel that I should note that there
is a proposal to add e.g. 'goto case 5' to C++17. (Note that I'm not sure if
it's even an official proposal yet, though, just that it's been brought up on
std-proposals.)
(*I* much prefer __builting_fallthrough() or some such...)