This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -Wparentheses lumps too much together
- From: Ian Lance Taylor <iant at google dot com>
- To: Joe Buck <Joe dot Buck at synopsys dot COM>
- Cc: Rehno Lindeque <errantkid at gmail dot com>, Ross Smith <r-smith at ihug dot co dot nz>, gcc at gcc dot gnu dot org
- Date: 11 Jan 2008 15:24:46 -0800
- Subject: Re: -Wparentheses lumps too much together
- References: <20071219200235.GA21525@oak.schemamania.org> <m3hciewav7.fsf@localhost.localdomain> <20071220005030.4971a442.jklowden@freetds.org> <200712201509.20582.paul@codesourcery.com> <476C1461.2050107@ihug.co.nz> <c10d42150801102334i27ef4achcff6a64cf6e356c@mail.gmail.com> <20080111165936.GB31668@synopsys.com>
Joe Buck <Joe.Buck@synopsys.COM> writes:
> A warning that flagged code like
>
> if (c1 || c2 && c3)
> ...
>
> would swamp users in warnings, since this kind of code is extremely
> common, and this isn't the kind of thing that anyone who's not a total C
> beginner has trouble with.
That is what -Wparentheses does today.
I think it's a good thing, because I've seen it catch coding errors in
real code.
Ian