[Bug c++/69850] [6 Regression] unnecessary -Wnonnull-compare warning
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 19 16:03:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69850
--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Feb 19 16:02:51 2016
New Revision: 233561
URL: https://gcc.gnu.org/viewcvs?rev=233561&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/g++.dg/warn/Wnonnull-compare-2.C
trunk/gcc/testsuite/g++.dg/warn/Wnonnull-compare-3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-gimplify.c
trunk/gcc/cp/init.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list