http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53131

--- Comment #2 from dcb <dcb314 at hotmail dot com> 2012-04-28 07:29:17 UTC ---
(In reply to comment #1)
> (In reply to comment #0)
> > I am somewhat surprised that -Wlogical-op isn't part of either -Wall
> > or possibly -Wextra.
> 
> It could be in -Wextra for GCC 4.8.

Righto. If it works well there, it can be promoted to -Wall later.

> > I've just tried -Wlogical-op out on a build of a recent Linux kernel
> > and 90 warnings are produced, so there is some evidence that
> > it would be useful.
> 
> Do the warnings indicate bugs or not?

Yes. I checked the first ten.

> There is also PR43772, which would be nice to fix before enabling this in 
> -Wall
> or -Wextra. However, I don't even have any idea why we are warning there.

Agreed, although I wouldn't regard one broken corner case as a show stopper.

In general the warning does find bugs, even in heavily worked on code
like the Linux kernel. It finds nothing in the source code of gcc, however,
so no rework costs there.

Reply via email to