aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-02-24 23:01:24 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-02-24 23:01:24 +0100
commit03ca8fb3da94f12e5cd2ba57373d3875cd8d8cf8 (patch)
treeaa66bb95b65b601ee8e6a8fef70163aacf5b9226 /gcc/tree-vrp.c
parent0b05329bbfaade628e97f5d33165f82337865153 (diff)
downloadgcc-03ca8fb3da94f12e5cd2ba57373d3875cd8d8cf8.zip
gcc-03ca8fb3da94f12e5cd2ba57373d3875cd8d8cf8.tar.gz
gcc-03ca8fb3da94f12e5cd2ba57373d3875cd8d8cf8.tar.bz2
re PR c++/69922 (Bogus -Wnonnull-compare for: ... ? static_cast<T*>(this) : nullptr)
PR c++/69922 * class.c (build_base_path): Set TREE_NO_WARNING on the null_test. Avoid folding it. * init.c (build_vec_delete_1, build_delete): Don't fold the non-NULL tests. * cp-gimplify.c (cp_fold): For TREE_NO_WARNING comparisons with NULL, unless they are folded into INTEGER_CST, error_mark_node or some comparison with NULL, avoid folding them and use either the original comparison or non-folded comparison of folded arguments. * cp-ubsan.c (cp_ubsan_instrument_vptr): Set TREE_NO_WARNING on the comparison, don't fold the comparison right away. * g++.dg/warn/Wnonnull-compare-6.C: New test. * g++.dg/warn/Wnonnull-compare-7.C: New test. * g++.dg/ubsan/pr69922.C: New test. From-SVN: r233684
Diffstat (limited to 'gcc/tree-vrp.c')
0 files changed, 0 insertions, 0 deletions