This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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...)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]