]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/69850 (unnecessary -Wnonnull-compare warning)
authorJakub Jelinek <jakub@redhat.com>
Fri, 19 Feb 2016 16:02:51 +0000 (17:02 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 19 Feb 2016 16:02:51 +0000 (17:02 +0100)
commit03a616ac3662234f556ff7267d25ba842b7b5bab
treede8388c3ac87b258351381e846f5a46652d15ea2
parent19e2158623cf45a9c9ea731957bea6c3de4a4e56
re PR c++/69850 (unnecessary -Wnonnull-compare warning)

PR c++/69850
* init.c (build_vec_delete_1): Set TREE_NO_WARNING on the NE_EXPR
condition.
* cp-gimplify.c (cp_fold): Propagate TREE_NO_WARNING from binary
operators if folding preserved the binop, just with different
arguments.

* g++.dg/warn/Wnonnull-compare-2.C: New test.
* g++.dg/warn/Wnonnull-compare-3.C: New test.

From-SVN: r233561
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/cp/init.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wnonnull-compare-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Wnonnull-compare-3.C [new file with mode: 0644]