From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26623 invoked by alias); 30 Apr 2014 16:40:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26564 invoked by uid 48); 30 Apr 2014 16:40:44 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/7652] -Wswitch-break : Warn if a switch case falls through Date: Wed, 30 Apr 2014 16:40:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-04/txt/msg02295.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D7652 --- Comment #29 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- (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? >=20 > No, AFAICS. Perhaps we could invent __builtin_fallthrough or some such. I like the previous suggestion of using "goto LABEL;". In fact, the warning message could explicitly say "use % to silence this warning". (In reply to Florian Weimer from comment #25) >=20 > In the end, need general (syntax-based) unreachable-code detection, so th= at > return statements and no-return functions suppress the warning as well, a= nd > so on. At least if this will be part of -Wall. For trivial cases, it should be just a matter of checking the type of the previous statement in c_stmt_ends_with_goto. >>From gcc-bugs-return-450276-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 30 16:47:39 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 969 invoked by alias); 30 Apr 2014 16:47:39 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 737 invoked by uid 48); 30 Apr 2014 16:47:34 -0000 From: "fweimer at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/7652] -Wswitch-break : Warn if a switch case falls through Date: Wed, 30 Apr 2014 16:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-04/txt/msg02296.txt.bz2 Content-length: 683 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D7652 --- Comment #30 from Florian Weimer --- (In reply to Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez from comment #29) > I like the previous suggestion of using "goto LABEL;". In fact, the warni= ng > message could explicitly say "use % to silence this warning". Does this mean that you propose a GCC extension which allows to write this? goto 5; case 5: I'm not sure if the extension is worth it, and it creates another source of errors/unclarities if another switch branch is inserted before "case 5:". = It looks like fall-through, but it isn't one because the case labels aren't aligned. >>From gcc-bugs-return-450277-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 30 16:54:57 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 10431 invoked by alias); 30 Apr 2014 16:54:57 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 10355 invoked by uid 48); 30 Apr 2014 16:54:53 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/7652] -Wswitch-break : Warn if a switch case falls through Date: Wed, 30 Apr 2014 16:54:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-04/txt/msg02297.txt.bz2 Content-length: 835 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D7652 --- Comment #31 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- (In reply to Florian Weimer from comment #30) > (In reply to Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez from comment #29) >=20 > > I like the previous suggestion of using "goto LABEL;". In fact, the war= ning > > message could explicitly say "use % to silence this warning". >=20 > Does this mean that you propose a GCC extension which allows to write thi= s? >=20 > goto 5; > case 5: Sorry, ignore my comment. I am not sure what I was thinking.... __builtin_fallthrough() seems fine enough. It could be mentioned by the war= ning message. But as you said, it would be better to detect as many false positi= ves as possible to avoid forcing people to use the __builtin work-around. >>From gcc-bugs-return-450278-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 30 17:02:02 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 21488 invoked by alias); 30 Apr 2014 17:02:02 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 21437 invoked by uid 48); 30 Apr 2014 17:01:58 -0000 From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60992] [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637 Date: Wed, 30 Apr 2014 17:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.1 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-04/txt/msg02298.txt.bz2 Content-length: 374 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60992 Jason Merrill changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org