PR c++/86569
commit4d984926c30d1fe2087c7f7d2a83fb767cce1178
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Jul 2018 07:48:56 +0000 (23 07:48 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Jul 2018 07:48:56 +0000 (23 07:48 +0000)
tree6c1df506f9a1846bd981daed7c17c39dec0df523
parent62cab5089882f91865e9040672f7932ae8d09db1
PR c++/86569
* cp-gimplify.c (cp_fold): Don't fold comparisons into other kind
of expressions other than INTEGER_CST regardless of TREE_NO_WARNING
or warn_nonnull_compare.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262928 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wnonnull-compare-9.C [new file with mode: 0644]