summaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-13 05:04:46 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-13 05:04:46 +0000
commitc7ca48eac9a14b2b5233d9deb347bf0e1188ca3f (patch)
tree572a495193f31f2ec341afb86e711e1dd2c80197 /gcc/cp/call.c
parent4fdaf896dddd224958053b670bc9be78f102e789 (diff)
downloadgcc-c7ca48eac9a14b2b5233d9deb347bf0e1188ca3f.tar.gz
PR bootstrap/44048
PR target/44099 gcc/cp: * cp-tree.def (NULLPTR_TYPE): Remove. * cp-tree.h (NULLPTR_TYPE_P): New. (SCALAR_TYPE_P): Use it. (nullptr_type_node): New. (cp_tree_index): Add CPTI_NULLPTR_TYPE. * decl.c (cxx_init_decl_processing): Call record_builtin_type on nullptr_type_node. * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE. * cxx-pretty-print.c (pp_cxx_constant): Likewise. * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise. * mangle.c (write_type): Likewise. * name-lookup.c (arg_assoc_type): Likewise. * typeck.c (build_reinterpret_cast_1): Likewise. * rtti.c (typeinfo_in_lib_p): Likewise. (emit_support_tinfos): Remove local nullptr_type_node. gcc: * dbxout.c (dbxout_type): Remove NULLPTR_TYPE handling. * sdbout.c (plain_type_1): Likewise. * dwarf2out.c (is_base_type): Likewise. (gen_type_die_with_usage): Likewise. Generate DW_TAG_unspecified_type for any LANG_TYPE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159350 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index dccb1d4fbfe..0f62059f42e 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -464,7 +464,7 @@ null_ptr_cst_p (tree t)
an rvalue of type std::nullptr_t. */
t = integral_constant_value (t);
if (t == null_node
- || TREE_CODE (TREE_TYPE (t)) == NULLPTR_TYPE)
+ || NULLPTR_TYPE_P (TREE_TYPE (t)))
return true;
if (CP_INTEGRAL_TYPE_P (TREE_TYPE (t)) && integer_zerop (t))
{
@@ -783,7 +783,7 @@ standard_conversion (tree to, tree from, tree expr, bool c_cast_p,
null pointer constant of integral type can be converted to an
rvalue of type std::nullptr_t. */
if ((tcode == POINTER_TYPE || TYPE_PTR_TO_MEMBER_P (to)
- || tcode == NULLPTR_TYPE)
+ || NULLPTR_TYPE_P (to))
&& expr && null_ptr_cst_p (expr))
conv = build_conv (ck_std, to, conv);
else if ((tcode == INTEGER_TYPE && fcode == POINTER_TYPE)
@@ -924,14 +924,14 @@ standard_conversion (tree to, tree from, tree expr, bool c_cast_p,
|| UNSCOPED_ENUM_P (from)
|| fcode == POINTER_TYPE
|| TYPE_PTR_TO_MEMBER_P (from)
- || fcode == NULLPTR_TYPE)
+ || NULLPTR_TYPE_P (from))
{
conv = build_conv (ck_std, to, conv);
if (fcode == POINTER_TYPE
|| TYPE_PTRMEM_P (from)
|| (TYPE_PTRMEMFUNC_P (from)
&& conv->rank < cr_pbool)
- || fcode == NULLPTR_TYPE)
+ || NULLPTR_TYPE_P (from))
conv->rank = cr_pbool;
return conv;
}
@@ -5209,7 +5209,7 @@ convert_arg_to_ellipsis (tree arg)
< TYPE_PRECISION (double_type_node))
&& !DECIMAL_FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (arg))))
arg = convert_to_real (double_type_node, arg);
- else if (TREE_CODE (TREE_TYPE (arg)) == NULLPTR_TYPE)
+ else if (NULLPTR_TYPE_P (TREE_TYPE (arg)))
arg = null_pointer_node;
else if (INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (arg)))
arg = perform_integral_promotions (arg);