From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18652 invoked by alias); 23 Jun 2013 06:44:01 -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 18580 invoked by uid 48); 23 Jun 2013 06:43:56 -0000 From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/7652] -Wswitch-break : Warn if a switch case falls through Date: Sun, 23 Jun 2013 06:44: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: dcb314 at hotmail 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: cc 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: 2013-06/txt/msg01256.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D7652 David Binderman changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcb314 at hotmail dot com --- Comment #17 from David Binderman --- (In reply to Daniel Marjam=C3=A4ki from comment #7) > In my experience this type of check is really noisy if there is a warning > for every fall through. >=20 > I recommend that the warning is written only if the fall through cause > redundant or bad behaviour. such as: >=20 > switch (foo) { > case 1: x =3D y; // <- redundant assignment > case 2: x =3D z; > }; I'd be happy with gcc warning for this kind of problem. This specific case should be easier to catch than the=20 general case. >>From gcc-bugs-return-424878-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Jun 23 07:15:01 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 29995 invoked by alias); 23 Jun 2013 07:15:00 -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 29318 invoked by uid 48); 23 Jun 2013 07:14:54 -0000 From: "webrown.cpp at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57682] New: Uniform initialization syntax rejected in function-try-block Date: Sun, 23 Jun 2013 07:15:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: webrown.cpp at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: 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: 2013-06/txt/msg01257.txt.bz2 Content-length: 911 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57682 Bug ID: 57682 Summary: Uniform initialization syntax rejected in function-try-block Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: webrown.cpp at gmail dot com Created attachment 30342 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30342&action=edit Source file demonstrating issue Compiling via: g++-mp-4.9 -std=gnu++1y -c bug.cc Using version: g++-mp-4.9 (MacPorts gcc49 4.9-20130616_0) 4.9.0 20130616 (experimental) Using paren's to initialize a data member will compile successfully, but using braces in their place produces a diagnostic. Define/undefine the OOPS macro in the attachment to reproduce failure/success.