From: Jakub Jelinek <jakub@redhat.com>
To: Marek Polacek <polacek@redhat.com>
Cc: Bernd Schmidt <bschmidt@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Joseph Myers <joseph@codesourcery.com>
Subject: Re: C/C++ PATCH to add -Wdangling-else option
Date: Tue, 26 Apr 2016 12:39:00 -0000 [thread overview]
Message-ID: <20160426123924.GT26501@tucnak.zalov.cz> (raw)
In-Reply-To: <20160426123201.GG28445@redhat.com>
On Tue, Apr 26, 2016 at 02:32:01PM +0200, Marek Polacek wrote:
> 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?
I support that change, and -Wparentheses will still enable this, it just
gives more fine-grained control and be in line with what clang does.
Bernd, how much are you against this change?
Jakub
next prev parent reply other threads:[~2016-04-26 12:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-13 14:14 Marek Polacek
2016-04-13 15:11 ` Jakub Jelinek
2016-04-13 15:13 ` Bernd Schmidt
2016-04-13 15:16 ` Jakub Jelinek
2016-04-26 12:32 ` Marek Polacek
2016-04-26 12:39 ` Jakub Jelinek [this message]
2016-04-26 13:03 ` Bernd Schmidt
2016-05-04 13:19 ` Marek Polacek
2016-05-04 15:39 ` Joseph Myers
2016-05-04 15:43 ` Marek Polacek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160426123924.GT26501@tucnak.zalov.cz \
--to=jakub@redhat.com \
--cc=bschmidt@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=joseph@codesourcery.com \
--cc=polacek@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).