]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c/ChangeLog
PR c/77490
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 24 Sep 2016 09:39:23 +0000 (09:39 +0000)
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 24 Sep 2016 09:39:23 +0000 (09:39 +0000)
commit481ce48135cce519b0a63fa3ea03426513a5dc44
tree2202f7c8afd097fcf4c53d3a4cbe532ead2f1c43
parent733ced655ee3fd2d1bcafdd012c650b11dc2a97e
PR c/77490
* c.opt (Wbool-operation): New.

* c-typeck.c (build_unary_op): Warn about bit not on expressions that
have boolean value.  Warn about ++/-- on booleans.

* typeck.c (cp_build_unary_op): Warn about bit not on expressions that
have boolean value.

* doc/invoke.texi: Document -Wbool-operation.

* c-c++-common/Wbool-operation-1.c: New test.
* gcc.dg/Wbool-operation-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240462 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c.opt
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wbool-operation-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wbool-operation-1.c [new file with mode: 0644]