aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2013-03-29 20:29:26 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2013-03-29 20:29:26 +0000
commit50e10fa881de2b9fd82f83bc0c4c24227e2a4a97 (patch)
tree9cb10a80ad3e11c0cfaafc6f3b7ba397b73dd690 /gcc/cp/tree.c
parent10c6dc8e3932d33c8e47e6706885d2412b29c069 (diff)
downloadgcc-50e10fa881de2b9fd82f83bc0c4c24227e2a4a97.zip
gcc-50e10fa881de2b9fd82f83bc0c4c24227e2a4a97.tar.gz
gcc-50e10fa881de2b9fd82f83bc0c4c24227e2a4a97.tar.bz2
call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
2013-03-29 Paolo Carlini <paolo.carlini@oracle.com> * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P. (build_op_call_1): Likewise. (build_over_call): Likewise. (compare_ics): Likewise. * class.c (build_base_path): Likewise. (resolve_address_of_overloaded_function): Likewise. * cp-tree.h: Likewise. * cvt.c (cp_convert_to_pointer): Likewise. (convert_to_reference): Likewise. (ocp_convert): Likewise. (convert_force): Likewise, tidy. * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise. (pp_cxx_ptr_operator): Likewise. * decl.c (duplicate_decls): Likewise. (start_decl): Likewise. (grok_op_properties): Likewise. (start_preparsed_function): Likewise. (store_parm_decls): Likewise. (finish_function): Likewise. * decl2.c (delete_sanity): Likewise. (acceptable_java_type): Likewise. (grokbitfield): Likewise. (cp_reconstruct_complex_type): Likewise. * error.c (dump_type_prefix): Likewise. (dump_expr): Likewise. * except.c (push_eh_cleanup): Likewise. (complete_ptr_ref_or_void_ptr_p): Likewise. (can_convert_eh): Likewise. * init.c (build_new_1): Likewise. (build_delete): Likewise. (build_vec_delete): Likewise. * mangle.c (write_type): Likewise. * parser.c (lookup_literal_operator): Likewise. * pt.c (convert_nontype_argument_function): Likewise. (convert_nontype_argument): Likewise. (tsubst): Likewise. (unify): Likewise. (dependent_type_p_r): Likewise. * rtti.c (build_headof): Likewise. (build_typeid): Likewise. (build_dynamic_cast_1): Likewise. (target_incomplete_p): Likewise. (typeinfo_in_lib_p): Likewise. * semantics.c (finish_omp_for): Likewise. (cxx_eval_call_expression): Likewise. (maybe_resolve_dummy): Likewise. * tree.c (build_target_expr): Likewise. (cp_build_qualified_type_real): Likewise. * typeck.c (composite_pointer_type_r): Likewise. (composite_pointer_type): Likewise. (comp_except_types): Likewise. (cxx_sizeof_nowarn): Likewise. (string_conv_p): Likewise. (cp_build_array_ref): Likewise. (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P. (pointer_diff): Likewise. (cp_build_addr_expr_1): Likewise. (cp_build_unary_op): Likewise. (build_static_cast_1): Likewise. (cp_build_c_cast): Likewise. (comp_ptr_ttypes_real): Likewise. (ptr_reasonably_similar): Likewise. (comp_ptr_ttypes_const): Likewise. (casts_away_constness): Likewise. (check_literal_operator_args): Likewise. * typeck2.c (build_x_arrow): Likewise. (add_exception_specifier): Likewise. From-SVN: r197249
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 8faf566..7fb8698 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -309,7 +309,7 @@ build_target_expr (tree decl, tree value, tsubst_flags_t complain)
gcc_assert (VOID_TYPE_P (TREE_TYPE (value))
|| TREE_TYPE (decl) == TREE_TYPE (value)
/* On ARM ctors return 'this'. */
- || (TREE_CODE (TREE_TYPE (value)) == POINTER_TYPE
+ || (TYPE_PTR_P (TREE_TYPE (value))
&& TREE_CODE (value) == CALL_EXPR)
|| useless_type_conversion_p (TREE_TYPE (decl),
TREE_TYPE (value)));
@@ -1086,7 +1086,7 @@ cp_build_qualified_type_real (tree type,
pointer-to-member-function type, because these will be distinct
between the unqualified and qualified types. */
if (result != type
- && TREE_CODE (type) == POINTER_TYPE
+ && TYPE_PTR_P (type)
&& TREE_CODE (TREE_TYPE (type)) == METHOD_TYPE
&& TYPE_LANG_SPECIFIC (result) == TYPE_LANG_SPECIFIC (type))
TYPE_LANG_SPECIFIC (result) = NULL;
@@ -1095,7 +1095,7 @@ cp_build_qualified_type_real (tree type,
type of a pointer-to-method type, which could have the same
sharing problem described above. */
if (TYPE_CANONICAL (result) != TYPE_CANONICAL (type)
- && TREE_CODE (type) == POINTER_TYPE
+ && TYPE_PTR_P (type)
&& TREE_CODE (TREE_TYPE (type)) == METHOD_TYPE
&& (TYPE_LANG_SPECIFIC (TYPE_CANONICAL (result))
== TYPE_LANG_SPECIFIC (TYPE_CANONICAL (type))))