summaryrefslogtreecommitdiff
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-30 18:31:30 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-30 18:31:30 +0000
commit339ad7cae01bd4b97e7cea7afecce3c4e811c3e0 (patch)
treec75ad6f57a0a20bf98ff10db1700e24698cdeef7 /gcc/cp/rtti.c
parent300d9dac87e160003f55d184f6f11d17c0179205 (diff)
downloadgcc-339ad7cae01bd4b97e7cea7afecce3c4e811c3e0.tar.gz
/cp
2011-11-30 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51299 * rtti.c (ifnonnull): Use nullptr_node. (build_dynamic_cast_1): Call cp_truthvalue_conversion instead of c_common_truthvalue_conversion. /testsuite 2011-11-30 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51299 * g++.dg/warn/Wzero-as-null-pointer-constant-4.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181854 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r--gcc/cp/rtti.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 818b8d0eee4..4494fddc03e 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -503,8 +503,8 @@ ifnonnull (tree test, tree result)
{
return build3 (COND_EXPR, TREE_TYPE (result),
build2 (EQ_EXPR, boolean_type_node, test,
- cp_convert (TREE_TYPE (test), integer_zero_node)),
- cp_convert (TREE_TYPE (result), integer_zero_node),
+ cp_convert (TREE_TYPE (test), nullptr_node)),
+ cp_convert (TREE_TYPE (result), nullptr_node),
result);
}
@@ -747,7 +747,7 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain)
tree neq;
result = save_expr (result);
- neq = c_common_truthvalue_conversion (input_location, result);
+ neq = cp_truthvalue_conversion (result);
return cp_convert (type,
build3 (COND_EXPR, TREE_TYPE (result),
neq, result, bad));