This is the mail archive of the
mailing list for the GCC project.
Re: -Wparentheses lumps too much together
"James K. Lowden" <firstname.lastname@example.org> writes:
> > That particular warning happened to find dozens of real errors when I
> > ran it over a large code base. It may be noise for you, but I know
> > from personal experience that it is very useful.
> I would like to hear more about that, if you wouldn't mind. I'm really
> quite surprised. Honestly.
I'm not free to share actual details, and I don't have the real
The warning triggered many false positives. But there were also a
number of true positives, far more than I expected.
A typical true positive looked more or less like
if (a &&
b || c)
often with a more complex condition. The indentation would express
the intent, so it was easy to read the code and assume that it meant
what it appeared to mean. But, of course, it didn't.