Re: C/C++ PATCH to add -Wdangling-else option

2016-05-04 Thread Marek Polacek
On Wed, May 04, 2016 at 03:39:19PM +, Joseph Myers wrote: > On Wed, 4 May 2016, Marek Polacek wrote: > > > On Tue, Apr 26, 2016 at 03:03:25PM +0200, Bernd Schmidt wrote: > > > On 04/26/2016 02:39 PM, Jakub Jelinek wrote: > > > > I support that change, and -Wparentheses will still enable this,

Re: C/C++ PATCH to add -Wdangling-else option

2016-05-04 Thread Joseph Myers
On Wed, 4 May 2016, Marek Polacek wrote: > On Tue, Apr 26, 2016 at 03:03:25PM +0200, Bernd Schmidt wrote: > > On 04/26/2016 02:39 PM, Jakub Jelinek wrote: > > > I support that change, and -Wparentheses will still enable this, it just > > > gives more fine-grained control and be in line with what c

Re: C/C++ PATCH to add -Wdangling-else option

2016-05-04 Thread Marek Polacek
On Tue, Apr 26, 2016 at 03:03:25PM +0200, Bernd Schmidt wrote: > On 04/26/2016 02:39 PM, Jakub Jelinek wrote: > > 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 agains

Re: C/C++ PATCH to add -Wdangling-else option

2016-04-26 Thread Bernd Schmidt
On 04/26/2016 02:39 PM, Jakub Jelinek wrote: 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? Don't really care that much, I just don't quite see the point.

Re: C/C++ PATCH to add -Wdangling-else option

2016-04-26 Thread Jakub Jelinek
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 th

Re: C/C++ PATCH to add -Wdangling-else option

2016-04-26 Thread Marek Polacek
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 w

Re: C/C++ PATCH to add -Wdangling-else option

2016-04-13 Thread Jakub Jelinek
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 th

Re: C/C++ PATCH to add -Wdangling-else option

2016-04-13 Thread Bernd Schmidt
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 precede

Re: C/C++ PATCH to add -Wdangling-else option

2016-04-13 Thread Jakub Jelinek
On Wed, Apr 13, 2016 at 04:14:44PM +0200, 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

C/C++ PATCH to add -Wdangling-else option

2016-04-13 Thread Marek Polacek
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 mi