This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -Wparentheses lumps too much together


jklowden@freetds.org writes:

> Much as I'm a fan of the GCC and rely on -Wall, I would like to suggest 
> to you that -Wparentheses should be split up, and things it checks/suggests
> be moved out of -Wall.  If this is not the right forum or if you'd rather
> see this as a bug report, I'm happy to go where I'm pointed.  

I have no objection to splitting -Wparentheses into separate warnings
controlled by separate options.


> My specific candidate for exclusion from -Wall is this one:
> 
> 	if (a && b || c && d)
> 
> which yields (as you know) advice to parenthesize the two && pairs.  

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.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]