[PATCH] Enable -Wlogical-not-parentheses by -Wall

Marek Polacek polacek@redhat.com
Wed Sep 3 19:40:00 GMT 2014


On Wed, Sep 03, 2014 at 12:53:21PM -0600, Jeff Law wrote:
> On 09/02/14 09:53, Marek Polacek wrote:
> >Now that PR61271 and PR62270 have been fixed, we can enable
> >-Wlogical-not-parentheses by -Wall.  I think this warning proved
> >useful.
> >
> >Bootstrapped/regtested on x86_64-linux and ppc64-linux, ok for trunk?
> >
> >2014-08-26  Marek Polacek  <polacek@redhat.com>
> >
> >	* doc/invoke.texi: Document that -Wlogical-not-parentheses is enabled
> >	by -Wall.
> >c-family/
> >	* c.opt (Wlogical-not-parentheses): Enable by -Wall.
> OK.  I'm sure this is going to trip in someone's code and they'll complain.
> But I've always stated that warnings, particularly from -Wall, are not
> consistent from release to release.  Thus someone using -Wall has to be
> prepared to fix their code at each release because we can and will add
> things to -Wall over time.

Yeah.  Fortunately the warning shouldn't have (m)any false positives.

	Marek



More information about the Gcc-patches mailing list