r214183 - in /trunk/gcc: ChangeLog c-family/Cha...
mpolacek@gcc.gnu.org
mpolacek@gcc.gnu.org
Tue Aug 19 18:50:00 GMT 2014
Author: mpolacek
Date: Tue Aug 19 18:50:00 2014
New Revision: 214183
URL: https://gcc.gnu.org/viewcvs?rev=214183&root=gcc&view=rev
Log:
PR c++/62153
* doc/invoke.texi: Document -Wbool-compare.
c-family/
* c-common.c (maybe_warn_bool_compare): New function.
* c-common.h (maybe_warn_bool_compare): Declare.
* c.opt (Wbool-compare): New option.
c/
* c-typeck.c (build_binary_op): If either operand of a comparison
is a boolean expression, call maybe_warn_bool_compare.
cp/
* call.c (build_new_op_1): Remember the type of arguments for
a comparison. If either operand of a comparison is a boolean
expression, call maybe_warn_bool_compare.
testsuite/
* c-c++-common/Wbool-compare-1.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/Wbool-compare-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/c-family/c-common.h
trunk/gcc/c-family/c.opt
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-typeck.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/doc/invoke.texi
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list