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

2016-09-26 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

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

2016-09-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #60 from Marek Polacek --- Author: mpolacek Date: Thu Sep 1 14:59:50 2016 New Revision: 239939 URL: https://gcc.gnu.org/viewcvs?rev=239939=gcc=rev Log: PR c/7652 gcc/c-family/ * c-common.c

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

2016-08-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #59 from Marek Polacek --- Author: mpolacek Date: Thu Aug 18 10:28:03 2016 New Revision: 239566 URL: https://gcc.gnu.org/viewcvs?rev=239566=gcc=rev Log: PR c/7652 gcc/cp/ * call.c (add_builtin_candidate): Add

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

2016-08-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #58 from Marek Polacek --- Author: mpolacek Date: Fri Aug 12 10:30:47 2016 New Revision: 239410 URL: https://gcc.gnu.org/viewcvs?rev=239410=gcc=rev Log: PR c/7652 gcc/ * alias.c (find_base_value): Adjust fall through

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

2016-08-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #57 from Marek Polacek --- Author: mpolacek Date: Fri Aug 12 10:15:57 2016 New Revision: 239409 URL: https://gcc.gnu.org/viewcvs?rev=239409=gcc=rev Log: PR c/7652 * tree-complex.c (expand_complex_division): Add

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

2016-08-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #56 from Marek Polacek --- Author: mpolacek Date: Tue Aug 9 16:39:28 2016 New Revision: 239297 URL: https://gcc.gnu.org/viewcvs?rev=239297=gcc=rev Log: PR c/7652 gcc/c-family/ * c-ada-spec.c (dump_generic_ada_node):

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

2016-08-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #55 from Marek Polacek --- Author: mpolacek Date: Mon Aug 1 16:03:41 2016 New Revision: 238958 URL: https://gcc.gnu.org/viewcvs?rev=238958=gcc=rev Log: PR c/7652 * config/i386/i386.c (ix86_expand_args_builtin): Add

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

2016-08-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #54 from Marek Polacek --- (In reply to Ozkan Sezer from comment #53) > (In reply to Marek Polacek from comment #52) > > Author: mpolacek > > Date: Fri Jul 29 12:39:25 2016 > > New Revision: 238864 > > > > URL:

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

2016-07-30 Thread sezeroz at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Ozkan Sezer changed: What|Removed |Added CC||sezeroz at gmail dot com --- Comment #53

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

2016-07-29 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #52 from Marek Polacek --- Author: mpolacek Date: Fri Jul 29 12:39:25 2016 New Revision: 238864 URL: https://gcc.gnu.org/viewcvs?rev=238864=gcc=rev Log: PR c/7652 * config/i386/i386.c (ix86_expand_args_builtin): Add

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

2016-07-29 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #51 from Marek Polacek --- Author: mpolacek Date: Fri Jul 29 11:26:46 2016 New Revision: 238858 URL: https://gcc.gnu.org/viewcvs?rev=238858=gcc=rev Log: PR c/7652 * config/rs6000/rs6000.c (altivec_expand_ld_builtin):

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

2016-07-29 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #50 from Marek Polacek --- Author: mpolacek Date: Fri Jul 29 11:22:42 2016 New Revision: 238857 URL: https://gcc.gnu.org/viewcvs?rev=238857=gcc=rev Log: PR c/7652 * config/rs6000/rs6000.c (altivec_expand_ld_builtin):

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

2016-07-29 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #49 from Marek Polacek --- Author: mpolacek Date: Fri Jul 29 11:16:20 2016 New Revision: 238856 URL: https://gcc.gnu.org/viewcvs?rev=238856=gcc=rev Log: PR c/7652 * config/rs6000/rs6000.c (altivec_expand_ld_builtin):

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

2016-07-28 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #48 from Marek Polacek --- Author: mpolacek Date: Thu Jul 28 15:46:07 2016 New Revision: 238824 URL: https://gcc.gnu.org/viewcvs?rev=238824=gcc=rev Log: PR c/7652 * jcf-dump.c (print_constant): Add break. Modified:

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

2016-07-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #47 from Marek Polacek --- (In reply to Tim Haines from comment #46) > (In reply to Marek Polacek from comment #45) > > Patches posted . > > Thank you for putting in the work

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

2016-07-18 Thread thaines.astro at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Tim Haines changed: What|Removed |Added CC||thaines.astro at gmail dot com --- Comment

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

2016-07-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #45 from Marek Polacek --- Patches posted .

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

2016-06-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #44 from Marek Polacek --- FYI, I have got a candidate patch, but the trouble comes with code such as case 1: if (x) bar (); // warn here else { bar (); return; } case 0: so this

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

2016-05-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

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

2016-03-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #42 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #41) > But it wasn't part of the working draft until now. Not everything that gets > approved by an EWG poll makes it into a standard. In case you really don't

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

2016-03-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #41 from Jonathan Wakely --- (In reply to Matthew Woehlke from comment #39) > So? People have been asking for it for at least *13+ years* (this report was > opened in August 2002). Compared to clang which has had this feature for >

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

2016-03-08 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #40 from Manuel López-Ibáñez --- (In reply to Matthew Woehlke from comment #39) > So? People have been asking for it for at least *13+ years* (this report was > opened in August 2002). Compared to clang which has had this feature for

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

2016-03-08 Thread mwoehlke.floss at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #39 from Matthew Woehlke --- (In reply to Jonathan Wakely from comment #38) > (In reply to Matthew Woehlke from comment #37) > > [[fallthrough]] was approved for C++17 [...] It's a shame that gcc is behind > > the curve here. > > It

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

2016-03-07 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #38 from Jonathan Wakely --- (In reply to Matthew Woehlke from comment #37) > [[fallthrough]] was approved for C++17. While the standard does not > normatively *require* a diagnostic, it's certainly expected that one be > issued. It's

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

2016-03-07 Thread mwoehlke.floss at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #37 from Matthew Woehlke --- > Essentially, this warning and the "intentional fallthrough" attribute exist for both clang and MSVC and will be enabled there; but GCC still doesn't have this feature. [[fallthrough]] was approved for

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

2016-03-07 Thread tromey at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Tom Tromey changed: What|Removed |Added CC||tromey at gcc dot gnu.org --- Comment #36

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

2014-09-23 Thread m.j.thayer at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Michael T. m.j.thayer at googlemail dot com changed: What|Removed |Added CC||m.j.thayer

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

2014-08-20 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #34 from Manuel López-Ibáñez manu at gcc dot gnu.org --- In any case, the current patch needs more work. In case you want to see this in GCC 5.0, you need to hurry up! :)

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

2014-04-30 Thread michael.chapman at cortus dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Michael Chapman michael.chapman at cortus dot com changed: What|Removed |Added CC|

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

2014-04-30 Thread mw_triad at users dot sourceforge.net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #22 from Matthew Woehlke mw_triad at users dot sourceforge.net --- Thanks for the patch. However, one thing I am not seeing is an easy way to suppress the warning for a specific occurrence (a la [[clang:fallthrough]]). Can that be added

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

2014-04-30 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #23 from Manuel López-Ibáñez manu at gcc dot gnu.org --- (In reply to Michael Chapman from comment #21) Created attachment 32716 [details] Proposed patch Patch to enable warnings (-Wswitch-fallthrough) when a switch case falls

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

2014-04-30 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #24 from Jonathan Wakely redi at gcc dot gnu.org --- (In reply to Matthew Woehlke from comment #22) [[gcc:fallthrough]] // suppress warning for fall-through to 'case C' N.B. the attribute-namespace for GNU extensions is gnu I

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

2014-04-30 Thread fweimer at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #25 from Florian Weimer fweimer at redhat dot com --- (In reply to Matthew Woehlke from comment #22) case B: ... [[gcc:fallthrough]] // suppress warning for fall-through to 'case C' Do we have such attributes in the C

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

2014-04-30 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Marek Polacek mpolacek at gcc dot gnu.org changed: What|Removed |Added CC||mpolacek at gcc

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

2014-04-30 Thread mw_triad at users dot sourceforge.net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #27 from Matthew Woehlke mw_triad at users dot sourceforge.net --- (In reply to Marek Polacek from comment #26) Perhaps we could invent __builtin_fallthrough or some such. Yes, I was expecting there would be some alternate spelling

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

2014-04-30 Thread alexfh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #28 from Alexander Kornienko alexfh at google dot com --- (In reply to Jonathan Wakely from comment #24) (In reply to Matthew Woehlke from comment #22) [[gcc:fallthrough]] // suppress warning for fall-through to 'case C' N.B.

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

2014-04-30 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #29 from Manuel López-Ibáñez manu at gcc dot gnu.org --- (In reply to Marek Polacek from comment #26) (In reply to Florian Weimer from comment #25) Do we have such attributes in the C compiler? No, AFAICS. Perhaps we could invent

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

2014-04-30 Thread fweimer at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #30 from Florian Weimer fweimer at redhat dot com --- (In reply to Manuel López-Ibáñez from comment #29) I like the previous suggestion of using goto LABEL;. In fact, the warning message could explicitly say use %goto %D;% to silence

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

2014-04-30 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #31 from Manuel López-Ibáñez manu at gcc dot gnu.org --- (In reply to Florian Weimer from comment #30) (In reply to Manuel López-Ibáñez from comment #29) I like the previous suggestion of using goto LABEL;. In fact, the warning

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

2014-04-30 Thread mw_triad at users dot sourceforge.net
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

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

2014-04-30 Thread michael.chapman at cortus dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #33 from Michael Chapman michael.chapman at cortus dot com --- (In reply to Florian Weimer from comment #30) (In reply to Manuel López-Ibáñez from comment #29) I like the previous suggestion of using goto LABEL;. In fact, the

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

2014-02-16 Thread jackie.rosen at hushmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Jackie Rosen jackie.rosen at hushmail dot com changed: What|Removed |Added CC|

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

2013-06-23 Thread dcb314 at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 David Binderman dcb314 at hotmail dot com changed: What|Removed |Added CC||dcb314 at

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

2013-06-23 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #18 from Manuel López-Ibáñez manu at gcc dot gnu.org --- (In reply to David Binderman from comment #17) (In reply to Daniel Marjamäki from comment #7) In my experience this type of check is really noisy if there is a warning for

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

2013-06-23 Thread jasonwucj at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Chung-Ju Wu jasonwucj at gmail dot com changed: What|Removed |Added CC||jasonwucj at gmail

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

2012-11-26 Thread arthur.j.odwyer at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Arthur O'Dwyer arthur.j.odwyer at gmail dot com changed: What|Removed |Added CC|

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

2012-11-26 Thread arthur.j.odwyer at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #16 from Arthur O'Dwyer arthur.j.odwyer at gmail dot com 2012-11-26 23:02:52 UTC --- (Sorry for the spam.) The corresponding Clang enhancement is http://llvm.org/bugs/show_bug.cgi?id=14440

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

2012-09-18 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Manuel López-Ibáñez manu at gcc dot gnu.org changed: What|Removed |Added CC||manu at gcc

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

2012-09-17 Thread alexfh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Alexander Kornienko alexfh at google dot com changed: What|Removed |Added CC||alexfh at

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

2012-07-14 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Jonathan Wakely redi at gcc dot gnu.org changed: What|Removed |Added Last reconfirmed|2005-12-10 05:44:21 |2012-07-14

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

2012-07-14 Thread david at doublewise dot net
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

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

2012-07-13 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Andrew Pinski pinskia at gcc dot gnu.org changed: What|Removed |Added CC||david at

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

2012-02-20 Thread eric at brouhaha dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Eric Smith eric at brouhaha dot com changed: What|Removed |Added CC||eric at brouhaha dot

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

2012-02-20 Thread eric at brouhaha dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 --- Comment #9 from Eric Smith eric at brouhaha dot com 2012-02-21 01:04:18 UTC --- Or, instead of a pragma as I proposed in me previous comment, the warning would be avoided by using a goto to the next case label. Updated version of the example

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

2011-07-29 Thread daniel.marjamaki at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Daniel Marjamäki daniel.marjamaki at gmail dot com changed: What|Removed |Added CC|

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

2011-05-09 Thread barnes.leo at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 Leo Barnes barnes.leo at gmail dot com changed: What|Removed |Added CC||barnes.leo at

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

2011-02-01 Thread alsuren+gcc at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652 David Laban alsuren+gcc at gmail dot com changed: What|Removed |Added CC||alsuren+gcc at

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

2010-03-04 Thread pinskia at gcc dot gnu dot org
--- Comment #4 from pinskia at gcc dot gnu dot org 2010-03-04 20:48 --- *** Bug 43250 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added