typeck.c (cp_build_unary_op): Diagnose incrementing boolean expressions.
authorMarek Polacek <polacek@redhat.com>
Wed, 14 Sep 2016 17:46:59 +0000 (17:46 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 14 Sep 2016 17:46:59 +0000 (17:46 +0000)
commit20a1e5b8c856e019b86b7e4990bad9dcb04d0e35
tree55c5f2b1653d82fbe2d3ac4ac243322ba2fdd242
parentf335184d24fa4ae7f1242e3a9bb675fab8e0b732
typeck.c (cp_build_unary_op): Diagnose incrementing boolean expressions.

* typeck.c (cp_build_unary_op): Diagnose incrementing boolean
expressions.  Tweak an error message.

* c-c++-common/gomp/atomic-12.c: Use -Wno-deprecated.
* c-c++-common/gomp/atomic-13.c: Likewise.
* c-c++-common/gomp/atomic-14.c: Likewise.
* g++.dg/cpp1y/lambda-init11.C: Remove invalid code.
* g++.dg/cpp1z/bool-increment1.C: New test.
* c-c++-common/pr60439.c: Add dg-warning.
* g++.dg/expr/bitfield4.C: Likewise.
* g++.dg/expr/bitfield5.C: Likewise.
* g++.dg/expr/bitfield6.C: Likewise.
* g++.dg/expr/bool1.C: Likewise.
* g++.dg/expr/bool3.C: Likewise.
* g++.dg/expr/lval3.C: Likewise.
* g++.dg/expr/lval4.C: Likewise.
* g++.old-deja/g++.jason/bool5.C: Likewise.
* g++.dg/expr/bitfield3.C: Adjust dg-error.
* g++.dg/other/error18.C: Likewise.
* g++.dg/gomp/atomic-14.C: Likewise.
libgomp/
* testsuite/libgomp.c++/atomic-3.C: Use -Wno-deprecated.
libstdc++-v3/
* testsuite/23_containers/vector/debug/insert6_neg.cc: Use
-Wno-deprecated.

From-SVN: r240141
24 files changed:
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/gomp/atomic-12.c
gcc/testsuite/c-c++-common/gomp/atomic-13.c
gcc/testsuite/c-c++-common/gomp/atomic-14.c
gcc/testsuite/c-c++-common/pr60439.c
gcc/testsuite/g++.dg/cpp1y/lambda-init11.C
gcc/testsuite/g++.dg/cpp1z/bool-increment1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/expr/bitfield3.C
gcc/testsuite/g++.dg/expr/bitfield4.C
gcc/testsuite/g++.dg/expr/bitfield5.C
gcc/testsuite/g++.dg/expr/bitfield6.C
gcc/testsuite/g++.dg/expr/bool1.C
gcc/testsuite/g++.dg/expr/bool3.C
gcc/testsuite/g++.dg/expr/lval3.C
gcc/testsuite/g++.dg/expr/lval4.C
gcc/testsuite/g++.dg/gomp/atomic-14.C
gcc/testsuite/g++.dg/other/error18.C
gcc/testsuite/g++.old-deja/g++.jason/bool5.C
libgomp/ChangeLog
libgomp/testsuite/libgomp.c++/atomic-3.C
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/23_containers/vector/debug/insert6_neg.cc