diff options
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 57d671b4d8e..f6890464d37 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -805,7 +805,7 @@ set_array_type_canon (tree t, tree elt_type, tree index_type) the element type. */ ttype * -build_cplus_array_type (tree elt_type, tree index_type) +build_cplus_array_type (ttype_p elt_type, tree index_type) { ttype *t; @@ -833,7 +833,7 @@ build_cplus_array_type (tree elt_type, tree index_type) hash = TYPE_UID (elt_type); if (index_type) hash ^= TYPE_UID (index_type); - cai.type = TTYPE (elt_type); + cai.type = elt_type; cai.domain = index_type; ttype **e = cplus_array_htab->find_slot_with_hash (&cai, hash, INSERT); @@ -996,7 +996,7 @@ move (tree expr) /* Used by the C++ front end to build qualified array types. However, the C version of this function does not properly maintain canonical types (which are not used in C). */ -tree +ttype * c_build_qualified_type (tree type, int type_quals) { return cp_build_qualified_type (type, type_quals); @@ -1024,7 +1024,7 @@ c_build_qualified_type (tree type, int type_quals) in a similar manner for restricting non-pointer types. */ ttype * -cp_build_qualified_type_real (tree type, +cp_build_qualified_type_real (ttype_p type, int type_quals, tsubst_flags_t complain) { @@ -1035,7 +1035,7 @@ cp_build_qualified_type_real (tree type, return error_type_node; if (type_quals == cp_type_quals (type)) - return TTYPE (type); + return type; if (TREE_CODE (type) == ARRAY_TYPE) { @@ -1130,9 +1130,9 @@ cp_build_qualified_type_real (tree type, return error_type_node; else { - tree bad_type = build_qualified_type (ptr_type_node, bad_quals); + ttype *bad_type = build_qualified_type (ptr_type_node, bad_quals); error ("%qV qualifiers cannot be applied to %qT", - bad_type, type); + bad_type, type.as_a_ttype ()); } /* Retrieve (or create) the appropriately qualified variant. */ @@ -1152,13 +1152,13 @@ cp_build_qualified_type_real (tree type, /* Return TYPE with const and volatile removed. */ -tree +ttype * cv_unqualified (tree type) { int quals; if (type == error_mark_node) - return type; + return error_type_node; quals = cp_type_quals (type); quals &= ~(TYPE_QUAL_CONST|TYPE_QUAL_VOLATILE); @@ -1878,12 +1878,12 @@ cp_check_qualified_type (const_tree cand, const_tree base, int type_quals, /* Build the FUNCTION_TYPE or METHOD_TYPE with the ref-qualifier RQUAL. */ ttype * -build_ref_qualified_type (tree type, cp_ref_qualifier rqual) +build_ref_qualified_type (ttype_p type, cp_ref_qualifier rqual) { ttype *t; if (rqual == type_memfn_rqual (type)) - return TTYPE (type); + return type; int type_quals = TYPE_QUALS (type); tree raises = TYPE_RAISES_EXCEPTIONS (type); @@ -2118,13 +2118,13 @@ cxx_printable_name_translate (tree decl, int v) listed in RAISES. */ ttype * -build_exception_variant (tree type, tree raises) +build_exception_variant (ttype_p type, tree raises) { ttype *v; int type_quals; if (comp_except_specs (raises, TYPE_RAISES_EXCEPTIONS (type), ce_exact)) - return TTYPE (type); + return type; type_quals = TYPE_QUALS (type); cp_ref_qualifier rqual = type_memfn_rqual (type); @@ -3701,27 +3701,27 @@ handle_abi_tag_type_attribute (ttype ** node, tree name, tree args, if (!OVERLOAD_TYPE_P (*node)) { error ("%qE attribute applied to non-class, non-enum type %qT", - name, TREE_CAST (*node)); + name, *node); goto fail; } else if (!(flags & (int)ATTR_FLAG_TYPE_IN_PLACE)) { error ("%qE attribute applied to %qT after its definition", - name, TREE_CAST (*node)); + name, *node); goto fail; } else if (CLASS_TYPE_P (*node) && CLASSTYPE_TEMPLATE_INSTANTIATION (*node)) { warning (OPT_Wattributes, "ignoring %qE attribute applied to " - "template instantiation %qT", name, TREE_CAST (*node)); + "template instantiation %qT", name, *node); goto fail; } else if (CLASS_TYPE_P (*node) && CLASSTYPE_TEMPLATE_SPECIALIZATION (*node)) { warning (OPT_Wattributes, "ignoring %qE attribute applied to " - "template specialization %qT", name, TREE_CAST (*node)); + "template specialization %qT", name, *node); goto fail; } |