diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2013-03-29 20:29:26 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2013-03-29 20:29:26 +0000 |
commit | 50e10fa881de2b9fd82f83bc0c4c24227e2a4a97 (patch) | |
tree | 9cb10a80ad3e11c0cfaafc6f3b7ba397b73dd690 /gcc/cp/rtti.c | |
parent | 10c6dc8e3932d33c8e47e6706885d2412b29c069 (diff) | |
download | gcc-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/rtti.c')
-rw-r--r-- | gcc/cp/rtti.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index b6a9a2e..e83d666 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -173,7 +173,7 @@ build_headof (tree exp) tree offset; tree index; - gcc_assert (TREE_CODE (type) == POINTER_TYPE); + gcc_assert (TYPE_PTR_P (type)); type = TREE_TYPE (type); if (!TYPE_POLYMORPHIC_P (type)) @@ -327,7 +327,7 @@ build_typeid (tree exp, tsubst_flags_t complain) /* FIXME when integrating with c_fully_fold, mark resolves_to_fixed_type_p case as a non-constant expression. */ if (INDIRECT_REF_P (exp) - && TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == POINTER_TYPE + && TYPE_PTR_P (TREE_TYPE (TREE_OPERAND (exp, 0))) && TYPE_POLYMORPHIC_P (TREE_TYPE (exp)) && ! resolves_to_fixed_type_p (exp, &nonnull) && ! nonnull) @@ -528,7 +528,7 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain) switch (tc) { case POINTER_TYPE: - if (TREE_CODE (TREE_TYPE (type)) == VOID_TYPE) + if (VOID_TYPE_P (TREE_TYPE (type))) break; /* Fall through. */ case REFERENCE_TYPE: @@ -559,7 +559,7 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain) expr = mark_rvalue_use (expr); - if (TREE_CODE (exprtype) != POINTER_TYPE) + if (!TYPE_PTR_P (exprtype)) { errstr = _("source is not a pointer"); goto fail; @@ -620,7 +620,7 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain) { expr = build_base_path (PLUS_EXPR, convert_from_reference (expr), binfo, 0, complain); - if (TREE_CODE (exprtype) == POINTER_TYPE) + if (TYPE_PTR_P (exprtype)) expr = rvalue (expr); return expr; } @@ -822,7 +822,7 @@ target_incomplete_p (tree type) return true; type = TYPE_PTRMEM_POINTED_TO_TYPE (type); } - else if (TREE_CODE (type) == POINTER_TYPE) + else if (TYPE_PTR_P (type)) type = TREE_TYPE (type); else return !COMPLETE_OR_VOID_TYPE_P (type); @@ -1053,7 +1053,7 @@ typeinfo_in_lib_p (tree type) { /* The typeinfo objects for `T*' and `const T*' are in the runtime library for simple types T. */ - if (TREE_CODE (type) == POINTER_TYPE + if (TYPE_PTR_P (type) && (cp_type_quals (TREE_TYPE (type)) == TYPE_QUAL_CONST || cp_type_quals (TREE_TYPE (type)) == TYPE_UNQUALIFIED)) type = TREE_TYPE (type); |