From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100380 invoked by alias); 26 Apr 2016 12:32:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 100370 invoked by uid 89); 26 Apr 2016 12:32:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=independently, Hx-languages-length:1394, dangling X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 26 Apr 2016 12:32:07 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C84F880F63; Tue, 26 Apr 2016 12:32:05 +0000 (UTC) Received: from redhat.com (ovpn-204-17.brq.redhat.com [10.40.204.17]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3QCW2oP024409 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 26 Apr 2016 08:32:04 -0400 Date: Tue, 26 Apr 2016 12:32:00 -0000 From: Marek Polacek To: Jakub Jelinek Cc: Bernd Schmidt , GCC Patches , Joseph Myers Subject: Re: C/C++ PATCH to add -Wdangling-else option Message-ID: <20160426123201.GG28445@redhat.com> References: <20160413141444.GT28445@redhat.com> <570E6218.6020503@redhat.com> <20160413151612.GS19207@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160413151612.GS19207@tucnak.redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2016-04/txt/msg01473.txt.bz2 On Wed, Apr 13, 2016 at 05:16:12PM +0200, Jakub Jelinek wrote: > On Wed, Apr 13, 2016 at 05:13:28PM +0200, Bernd Schmidt wrote: > > On 04/13/2016 04:14 PM, Marek Polacek wrote: > > >This patch is meant to be applied on top of the "Wparentheses overhaul" patch. > > > > > >I really think that warning about the dangling else problem isn't appropriate > > >as a part of the -Wparentheses warning, which I think should only deal with > > >stuff like precedence of operators, i.e. things where ()'s are missing and not > > >{}'s. > > > > > >This new warning is, however, a subset of -Wparentheses. > > > > > >Bootstrapped/regtested on x86_64-linux, ok for trunk or should I stash it > > >for the next stage1? > > > > I think it's not appropriate for now. I'm ambivalent about the concept; my > > (vague) recollection is that putting it under -Wparentheses was Kenner's > > idea, and it's been there so long that I'm not sure there's really a point > > to changing this. In a sense it is a very similar problem as operator > > precedence. > > Well, even with the change it is still included with -Wparentheses, just > it is a suboption with more specific name that can be enabled/disabled > independently from -Wparentheses if needed. > Though, of course, it can wait for GCC 7. So how do y'all feel about this patch now that we're in stage1? Marek