aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mmitchel@gcc.gnu.org>1999-09-09 06:17:13 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-09 06:17:13 +0000
commite1b3e07d15a82f07afc3ebd6ecf4ee0334a90d65 (patch)
tree5953ca2b981b4fba376c0372f43a13e5ce7fa27d
parentfc009f966c98317401b51127f59de4ad37bb7d19 (diff)
downloadgcc-e1b3e07d15a82f07afc3ebd6ecf4ee0334a90d65.zip
gcc-e1b3e07d15a82f07afc3ebd6ecf4ee0334a90d65.tar.gz
gcc-e1b3e07d15a82f07afc3ebd6ecf4ee0334a90d65.tar.bz2
cp-tree.h (scratch_tree_cons): Remove.
* cp-tree.h (scratch_tree_cons): Remove. * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons, and perm_tree_cons with plain tree_cons. * class.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * init.c: Likewise. * lex.c: Likewise. * method.c: Likewise. * parse.y: Likewise. * pt.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * typeck.c: Likewise. * parse.c: Regenerated. * tree.c (build_srcloc): Simplify. From-SVN: r29225
-rw-r--r--gcc/cp/call.c86
-rw-r--r--gcc/cp/class.c16
-rw-r--r--gcc/cp/cp-tree.h1
-rw-r--r--gcc/cp/decl.c35
-rw-r--r--gcc/cp/decl2.c18
-rw-r--r--gcc/cp/except.c16
-rw-r--r--gcc/cp/expr.c2
-rw-r--r--gcc/cp/init.c32
-rw-r--r--gcc/cp/lex.c6
-rw-r--r--gcc/cp/method.c4
-rw-r--r--gcc/cp/parse.c8
-rw-r--r--gcc/cp/parse.y8
-rw-r--r--gcc/cp/pt.c43
-rw-r--r--gcc/cp/repo.c8
-rw-r--r--gcc/cp/rtti.c16
-rw-r--r--gcc/cp/search.c19
-rw-r--r--gcc/cp/tree.c9
-rw-r--r--gcc/cp/typeck.c34
18 files changed, 170 insertions, 191 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index dced83b..ac0ad6b 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -162,7 +162,7 @@ build_field_call (basetype_path, instance_ptr, name, parms)
else if (TREE_CODE (TREE_TYPE (TREE_TYPE (instance)))
== METHOD_TYPE)
return build_function_call
- (instance, expr_tree_cons (NULL_TREE, instance_ptr, parms));
+ (instance, tree_cons (NULL_TREE, instance_ptr, parms));
}
}
@@ -1992,10 +1992,10 @@ add_builtin_candidates (candidates, code, code2, fnname, args, flags)
if (code == COND_EXPR)
{
if (real_lvalue_p (args[i]))
- types[i] = scratch_tree_cons
+ types[i] = tree_cons
(NULL_TREE, build_reference_type (argtypes[i]), types[i]);
- types[i] = scratch_tree_cons
+ types[i] = tree_cons
(NULL_TREE, TYPE_MAIN_VARIANT (argtypes[i]), types[i]);
}
@@ -2012,37 +2012,37 @@ add_builtin_candidates (candidates, code, code2, fnname, args, flags)
continue;
if (code == COND_EXPR && TREE_CODE (type) == REFERENCE_TYPE)
- types[i] = scratch_tree_cons (NULL_TREE, type, types[i]);
+ types[i] = tree_cons (NULL_TREE, type, types[i]);
type = non_reference (type);
if (i != 0 || ! ref1)
{
type = TYPE_MAIN_VARIANT (type_decays_to (type));
if (code == COND_EXPR && TREE_CODE (type) == ENUMERAL_TYPE)
- types[i] = scratch_tree_cons (NULL_TREE, type, types[i]);
+ types[i] = tree_cons (NULL_TREE, type, types[i]);
if (INTEGRAL_TYPE_P (type))
type = type_promotes_to (type);
}
if (! value_member (type, types[i]))
- types[i] = scratch_tree_cons (NULL_TREE, type, types[i]);
+ types[i] = tree_cons (NULL_TREE, type, types[i]);
}
}
else
{
if (code == COND_EXPR && real_lvalue_p (args[i]))
- types[i] = scratch_tree_cons
+ types[i] = tree_cons
(NULL_TREE, build_reference_type (argtypes[i]), types[i]);
type = non_reference (argtypes[i]);
if (i != 0 || ! ref1)
{
type = TYPE_MAIN_VARIANT (type_decays_to (type));
if (code == COND_EXPR && TREE_CODE (type) == ENUMERAL_TYPE)
- types[i] = scratch_tree_cons (NULL_TREE, type, types[i]);
+ types[i] = tree_cons (NULL_TREE, type, types[i]);
if (INTEGRAL_TYPE_P (type))
type = type_promotes_to (type);
}
- types[i] = scratch_tree_cons (NULL_TREE, type, types[i]);
+ types[i] = tree_cons (NULL_TREE, type, types[i]);
}
}
@@ -2256,8 +2256,8 @@ build_user_type_conversion_1 (totype, expr, flags)
TREE_TYPE (t) = build_pointer_type (totype);
args = build_scratch_list (NULL_TREE, expr);
if (TYPE_USES_VIRTUAL_BASECLASSES (totype))
- args = scratch_tree_cons (NULL_TREE, integer_one_node, args);
- args = scratch_tree_cons (NULL_TREE, t, args);
+ args = tree_cons (NULL_TREE, integer_one_node, args);
+ args = tree_cons (NULL_TREE, t, args);
ctors = TREE_VALUE (ctors);
}
@@ -2269,7 +2269,7 @@ build_user_type_conversion_1 (totype, expr, flags)
if (TREE_CODE (ctor) == TEMPLATE_DECL)
{
- templates = scratch_tree_cons (NULL_TREE, ctor, templates);
+ templates = tree_cons (NULL_TREE, ctor, templates);
candidates =
add_template_candidate (candidates, ctor,
NULL_TREE, args, NULL_TREE, flags,
@@ -2319,7 +2319,7 @@ build_user_type_conversion_1 (totype, expr, flags)
if (TREE_CODE (fn) == TEMPLATE_DECL)
{
- templates = scratch_tree_cons (NULL_TREE, fn, templates);
+ templates = tree_cons (NULL_TREE, fn, templates);
candidates =
add_template_candidate (candidates, fn, NULL_TREE,
args, totype, flags,
@@ -2476,7 +2476,7 @@ build_new_function_call (fn, args)
if (TREE_CODE (t) == TEMPLATE_DECL)
{
- templates = scratch_tree_cons (NULL_TREE, t, templates);
+ templates = tree_cons (NULL_TREE, t, templates);
candidates = add_template_candidate
(candidates, t, explicit_targs, args, NULL_TREE,
LOOKUP_NORMAL, DEDUCE_CALL);
@@ -2555,7 +2555,7 @@ build_object_call (obj, args)
if (fns)
{
tree base = TREE_PURPOSE (fns);
- mem_args = scratch_tree_cons (NULL_TREE, build_this (obj), args);
+ mem_args = tree_cons (NULL_TREE, build_this (obj), args);
for (fns = TREE_VALUE (fns); fns; fns = OVL_NEXT (fns))
{
@@ -3139,10 +3139,10 @@ build_new_op (code, flags, arg1, arg2, arg3)
arg2 = integer_zero_node;
if (arg2 && arg3)
- arglist = scratch_tree_cons (NULL_TREE, arg1, scratch_tree_cons
+ arglist = tree_cons (NULL_TREE, arg1, tree_cons
(NULL_TREE, arg2, build_scratch_list (NULL_TREE, arg3)));
else if (arg2)
- arglist = scratch_tree_cons (NULL_TREE, arg1, build_scratch_list (NULL_TREE, arg2));
+ arglist = tree_cons (NULL_TREE, arg1, build_scratch_list (NULL_TREE, arg2));
else
arglist = build_scratch_list (NULL_TREE, arg1);
@@ -3155,7 +3155,7 @@ build_new_op (code, flags, arg1, arg2, arg3)
tree fn = OVL_CURRENT (fns);
if (TREE_CODE (fn) == TEMPLATE_DECL)
{
- templates = scratch_tree_cons (NULL_TREE, fn, templates);
+ templates = tree_cons (NULL_TREE, fn, templates);
candidates
= add_template_candidate (candidates, fn, NULL_TREE,
arglist, TREE_TYPE (fnname),
@@ -3177,7 +3177,7 @@ build_new_op (code, flags, arg1, arg2, arg3)
if (fns)
{
tree basetype = TREE_PURPOSE (fns);
- mem_arglist = scratch_tree_cons (NULL_TREE, build_this (arg1), TREE_CHAIN (arglist));
+ mem_arglist = tree_cons (NULL_TREE, build_this (arg1), TREE_CHAIN (arglist));
for (fns = TREE_VALUE (fns); fns; fns = OVL_NEXT (fns))
{
tree fn = OVL_CURRENT (fns);
@@ -3191,7 +3191,7 @@ build_new_op (code, flags, arg1, arg2, arg3)
if (TREE_CODE (fn) == TEMPLATE_DECL)
{
/* A member template. */
- templates = scratch_tree_cons (NULL_TREE, fn, templates);
+ templates = tree_cons (NULL_TREE, fn, templates);
candidates
= add_template_candidate (candidates, fn, NULL_TREE,
this_arglist, TREE_TYPE (fnname),
@@ -3521,7 +3521,7 @@ build_op_delete_call (code, addr, size, flags, placement)
if (TREE_CODE (fns) == TREE_LIST)
/* Member functions. */
enforce_access (TREE_PURPOSE (fns), fn);
- return build_function_call (fn, expr_tree_cons (NULL_TREE, addr, args));
+ return build_function_call (fn, tree_cons (NULL_TREE, addr, args));
}
/* If we are doing placement delete we do nothing if we don't find a
@@ -3542,8 +3542,8 @@ build_op_delete_call (code, addr, size, flags, placement)
/* Member functions. */
enforce_access (TREE_PURPOSE (fns), fn);
return build_function_call
- (fn, expr_tree_cons (NULL_TREE, addr,
- build_expr_list (NULL_TREE, size)));
+ (fn, tree_cons (NULL_TREE, addr,
+ build_expr_list (NULL_TREE, size)));
}
/* finish_function passes LOOKUP_SPECULATIVELY if we're in a
@@ -3628,8 +3628,8 @@ convert_like (convs, expr)
args = build_scratch_list (NULL_TREE, expr);
if (TYPE_USES_VIRTUAL_BASECLASSES (DECL_CONTEXT (fn)))
- args = scratch_tree_cons (NULL_TREE, integer_one_node, args);
- args = scratch_tree_cons (NULL_TREE, t, args);
+ args = tree_cons (NULL_TREE, integer_one_node, args);
+ args = tree_cons (NULL_TREE, t, args);
}
else
args = build_this (expr);
@@ -3856,12 +3856,12 @@ build_over_call (cand, args, flags)
resolution, and must be of the proper type. */
if (DECL_CONSTRUCTOR_P (fn))
{
- converted_args = expr_tree_cons (NULL_TREE, TREE_VALUE (arg), converted_args);
+ converted_args = tree_cons (NULL_TREE, TREE_VALUE (arg), converted_args);
arg = TREE_CHAIN (arg);
parm = TREE_CHAIN (parm);
if (TYPE_USES_VIRTUAL_BASECLASSES (DECL_CONTEXT (fn)))
{
- converted_args = expr_tree_cons
+ converted_args = tree_cons
(NULL_TREE, TREE_VALUE (arg), converted_args);
arg = TREE_CHAIN (arg);
parm = TREE_CHAIN (parm);
@@ -3885,7 +3885,7 @@ build_over_call (cand, args, flags)
optimize accordingly. */
my_friendly_assert (TREE_CODE (parmtype) == POINTER_TYPE, 19990811);
t = convert_pointer_to_real (TREE_TYPE (parmtype), TREE_VALUE (arg));
- converted_args = expr_tree_cons (NULL_TREE, t, converted_args);
+ converted_args = tree_cons (NULL_TREE, t, converted_args);
parm = TREE_CHAIN (parm);
arg = TREE_CHAIN (arg);
++i;
@@ -3933,24 +3933,24 @@ build_over_call (cand, args, flags)
|| TREE_CODE (type) == ENUMERAL_TYPE)
&& (TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)))
val = default_conversion (val);
- converted_args = expr_tree_cons (NULL_TREE, val, converted_args);
+ converted_args = tree_cons (NULL_TREE, val, converted_args);
}
/* Default arguments */
for (; parm && parm != void_list_node; parm = TREE_CHAIN (parm))
converted_args
- = expr_tree_cons (NULL_TREE,
- convert_default_arg (TREE_VALUE (parm),
- TREE_PURPOSE (parm),
- fn),
- converted_args);
+ = tree_cons (NULL_TREE,
+ convert_default_arg (TREE_VALUE (parm),
+ TREE_PURPOSE (parm),
+ fn),
+ converted_args);
/* Ellipsis */
for (; arg; arg = TREE_CHAIN (arg))
converted_args
- = expr_tree_cons (NULL_TREE,
- convert_arg_to_ellipsis (TREE_VALUE (arg)),
- converted_args);
+ = tree_cons (NULL_TREE,
+ convert_arg_to_ellipsis (TREE_VALUE (arg)),
+ converted_args);
converted_args = nreverse (converted_args);
@@ -4206,9 +4206,9 @@ build_new_method_call (instance, name, args, basetype_path, flags)
&& ! (flags & LOOKUP_HAS_IN_CHARGE))
{
flags |= LOOKUP_HAS_IN_CHARGE;
- args = scratch_tree_cons (NULL_TREE, integer_one_node, args);
+ args = tree_cons (NULL_TREE, integer_one_node, args);
}
- mem_args = scratch_tree_cons (NULL_TREE, instance_ptr, args);
+ mem_args = tree_cons (NULL_TREE, instance_ptr, args);
for (; fn; fn = OVL_NEXT (fn))
{
tree t = OVL_CURRENT (fn);
@@ -4227,7 +4227,7 @@ build_new_method_call (instance, name, args, basetype_path, flags)
if (TREE_CODE (t) == TEMPLATE_DECL)
{
/* A member template. */
- templates = scratch_tree_cons (NULL_TREE, t, templates);
+ templates = tree_cons (NULL_TREE, t, templates);
candidates =
add_template_candidate (candidates, t, explicit_targs,
this_arglist,
@@ -4774,9 +4774,9 @@ static void
add_warning (winner, loser)
struct z_candidate *winner, *loser;
{
- winner->warnings = expr_tree_cons (NULL_PTR,
- build_expr_ptr_wrapper (loser),
- winner->warnings);
+ winner->warnings = tree_cons (NULL_PTR,
+ build_expr_ptr_wrapper (loser),
+ winner->warnings);
}
/* Returns true iff functions are equivalent. Equivalent functions are
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index ab417f5..2c6a03f 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -399,8 +399,8 @@ build_vtable_entry (delta, pfn)
else
{
extern int flag_huge_objects;
- tree elems = expr_tree_cons (NULL_TREE, delta,
- expr_tree_cons (NULL_TREE, integer_zero_node,
+ tree elems = tree_cons (NULL_TREE, delta,
+ tree_cons (NULL_TREE, integer_zero_node,
build_expr_list (NULL_TREE, pfn)));
tree entry = build (CONSTRUCTOR, vtable_entry_type, NULL_TREE, elems);
@@ -3358,7 +3358,7 @@ finish_struct_1 (t)
else
fields = TREE_CHAIN (x);
- access_decls = scratch_tree_cons (NULL_TREE, x, access_decls);
+ access_decls = tree_cons (NULL_TREE, x, access_decls);
continue;
}
@@ -4820,7 +4820,7 @@ resolve_address_of_overloaded_function (target_type,
fntype = build_pointer_type (fntype);
if (can_convert_arg (target_type, fntype, fn))
- matches = scratch_tree_cons (fn, NULL_TREE, matches);
+ matches = tree_cons (fn, NULL_TREE, matches);
}
}
@@ -4879,7 +4879,7 @@ resolve_address_of_overloaded_function (target_type,
else if (!is_reference)
instantiation_type = build_pointer_type (instantiation_type);
if (can_convert_arg (target_type, instantiation_type, instantiation))
- matches = scratch_tree_cons (instantiation, fn, matches);
+ matches = tree_cons (instantiation, fn, matches);
}
/* Now, remove all but the most specialized of the matches. */
@@ -4889,7 +4889,7 @@ resolve_address_of_overloaded_function (target_type,
explicit_targs);
if (match != error_mark_node)
- matches = scratch_tree_cons (match, NULL_TREE, NULL_TREE);
+ matches = tree_cons (match, NULL_TREE, NULL_TREE);
}
}
@@ -4907,8 +4907,8 @@ resolve_address_of_overloaded_function (target_type,
TREE_VALUE slots, so we cons one up here (we're losing anyway,
so why be clever?). */
for (; overload; overload = OVL_NEXT (overload))
- matches = scratch_tree_cons (NULL_TREE, OVL_CURRENT (overload),
- matches);
+ matches = tree_cons (NULL_TREE, OVL_CURRENT (overload),
+ matches);
print_candidates (matches);
}
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index f5b1a6e..4a37cdb 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3709,7 +3709,6 @@ extern tree cp_build_qualified_type_real PROTO((tree, int, int));
cp_build_qualified_type_real ((TYPE), (QUALS), /*complain=*/1)
#define scratchalloc expralloc
-#define scratch_tree_cons expr_tree_cons
#define build_scratch_list build_expr_list
#define make_scratch_vec make_temp_vec
#define push_scratch_obstack push_expression_obstack
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 264f7b2..6305a62 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -2687,7 +2687,7 @@ maybe_process_template_type_declaration (type, globalize, b)
that won't happen below because B is not the class
binding level, but is instead the pseudo-global level. */
b->level_chain->tags =
- saveable_tree_cons (name, type, b->level_chain->tags);
+ tree_cons (name, type, b->level_chain->tags);
if (TYPE_SIZE (current_class_type) == NULL_TREE)
CLASSTYPE_TAGS (current_class_type) = b->level_chain->tags;
}
@@ -2737,10 +2737,7 @@ pushtag (name, type, globalize)
|| (globalize && b->parm_flag == 2))
b = b->level_chain;
- if (toplevel_bindings_p ())
- b->tags = perm_tree_cons (name, type, b->tags);
- else
- b->tags = saveable_tree_cons (name, type, b->tags);
+ b->tags = tree_cons (name, type, b->tags);
if (name)
{
@@ -4401,7 +4398,7 @@ push_using_directive (used)
ancestor = namespace_ancestor (current_decl_namespace (), used);
ud = current_binding_level->using_directives;
- ud = perm_tree_cons (used, ancestor, ud);
+ ud = tree_cons (used, ancestor, ud);
current_binding_level->using_directives = ud;
return ud;
}
@@ -5483,7 +5480,7 @@ unqualified_namespace_lookup (name, flags, spacesp)
for (; !val; scope = CP_DECL_CONTEXT (scope))
{
if (spacesp)
- *spacesp = scratch_tree_cons (scope, NULL_TREE, *spacesp);
+ *spacesp = tree_cons (scope, NULL_TREE, *spacesp);
val = binding_for_name (name, scope);
/* Initialize binding for this context. */
@@ -8185,9 +8182,9 @@ expand_static_init (decl, init)
mark_addressable (cleanup);
cleanup = build_unary_op (ADDR_EXPR, cleanup, 0);
fcall = build_function_call (Atexit,
- expr_tree_cons (NULL_TREE,
- cleanup,
- NULL_TREE));
+ tree_cons (NULL_TREE,
+ cleanup,
+ NULL_TREE));
finish_expr_stmt (fcall);
}
@@ -8205,7 +8202,7 @@ expand_static_init (decl, init)
currently in the temporary obstack. */
if (!TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl)))
preserve_initializer ();
- static_aggregates = perm_tree_cons (init, decl, static_aggregates);
+ static_aggregates = tree_cons (init, decl, static_aggregates);
}
}
@@ -8535,9 +8532,9 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
the information in the TEMPLATE_ID_EXPR. */
SET_DECL_IMPLICIT_INSTANTIATION (decl);
DECL_TEMPLATE_INFO (decl)
- = perm_tree_cons (TREE_OPERAND (orig_declarator, 0),
- TREE_OPERAND (orig_declarator, 1),
- NULL_TREE);
+ = tree_cons (TREE_OPERAND (orig_declarator, 0),
+ TREE_OPERAND (orig_declarator, 1),
+ NULL_TREE);
if (has_default_arg)
{
@@ -11614,7 +11611,7 @@ grokparms (first_parm, funcdef_flag)
TREE_CHAIN (list_node) = NULL_TREE;
}
else
- list_node = saveable_tree_cons (init, type, NULL_TREE);
+ list_node = tree_cons (init, type, NULL_TREE);
if (result == NULL_TREE)
{
result = list_node;
@@ -12796,7 +12793,7 @@ build_enumerator (name, value, type)
enum_overflow = tree_int_cst_lt (enum_next_value, value);
}
- result = saveable_tree_cons (name, decl, NULL_TREE);
+ result = tree_cons (name, decl, NULL_TREE);
return result;
}
@@ -14034,9 +14031,9 @@ finish_function (lineno, flags)
}
if (DECL_STATIC_CONSTRUCTOR (fndecl))
- static_ctors = perm_tree_cons (NULL_TREE, fndecl, static_ctors);
+ static_ctors = tree_cons (NULL_TREE, fndecl, static_ctors);
if (DECL_STATIC_DESTRUCTOR (fndecl))
- static_dtors = perm_tree_cons (NULL_TREE, fndecl, static_dtors);
+ static_dtors = tree_cons (NULL_TREE, fndecl, static_dtors);
if (! nested)
{
@@ -14296,7 +14293,7 @@ maybe_build_cleanup_1 (decl, auto_delete)
if (TYPE_USES_VIRTUAL_BASECLASSES (type)
&& ! TYPE_HAS_DESTRUCTOR (type))
- rval = build_compound_expr (expr_tree_cons (NULL_TREE, rval,
+ rval = build_compound_expr (tree_cons (NULL_TREE, rval,
build_expr_list (NULL_TREE, build_vbase_delete (type, decl))));
if (TREE_CODE (decl) != PARM_DECL)
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 6ca93f9..332fca5 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -2151,7 +2151,7 @@ build_anon_union_vars (anon_decl, elems, static_p, external_p)
/* If there's a cleanup to do, it belongs in the
TREE_PURPOSE of the following TREE_LIST. */
- *elems = scratch_tree_cons (NULL_TREE, decl, *elems);
+ *elems = tree_cons (NULL_TREE, decl, *elems);
TREE_TYPE (*elems) = type;
}
@@ -2952,8 +2952,8 @@ start_static_storage_duration_function ()
/* Create the parameters. */
parm_types = void_list_node;
- parm_types = perm_tree_cons (NULL_TREE, integer_type_node, parm_types);
- parm_types = perm_tree_cons (NULL_TREE, integer_type_node, parm_types);
+ parm_types = tree_cons (NULL_TREE, integer_type_node, parm_types);
+ parm_types = tree_cons (NULL_TREE, integer_type_node, parm_types);
type = build_function_type (void_type_node, parm_types);
/* Create the FUNCTION_DECL itself. */
@@ -3986,7 +3986,7 @@ build_expr_from_tree (t)
chain = TREE_CHAIN (t);
if (chain && chain != void_type_node)
chain = build_expr_from_tree (chain);
- return expr_tree_cons (purpose, value, chain);
+ return tree_cons (purpose, value, chain);
}
case COMPONENT_REF:
@@ -4185,14 +4185,14 @@ add_using_namespace (user, used, indirect)
/* Add used to the user's using list. */
DECL_NAMESPACE_USING (user)
- = perm_tree_cons (used, namespace_ancestor (user, used),
- DECL_NAMESPACE_USING (user));
+ = tree_cons (used, namespace_ancestor (user, used),
+ DECL_NAMESPACE_USING (user));
TREE_INDIRECT_USING (DECL_NAMESPACE_USING (user)) = indirect;
/* Add user to the used's users list. */
DECL_NAMESPACE_USERS (used)
- = perm_tree_cons (user, 0, DECL_NAMESPACE_USERS (used));
+ = tree_cons (user, 0, DECL_NAMESPACE_USERS (used));
/* Recursively add all namespaces used. */
for (t = DECL_NAMESPACE_USING (used); t; t = TREE_CHAIN (t))
@@ -4335,8 +4335,8 @@ lookup_using_namespace (name, val, usings, scope, flags, spacesp)
if (TREE_VALUE (iter) == scope)
{
if (spacesp)
- *spacesp = scratch_tree_cons (TREE_PURPOSE (iter), NULL_TREE,
- *spacesp);
+ *spacesp = tree_cons (TREE_PURPOSE (iter), NULL_TREE,
+ *spacesp);
val1 = binding_for_name (name, TREE_PURPOSE (iter));
/* Resolve ambiguities. */
val = ambiguous_decl (name, val, val1, flags);
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 87c6e47..18bd798 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -470,7 +470,7 @@ do_pop_exception ()
mark_used (fn);
/* Arrange to do a dynamically scoped cleanup upon exit from this region. */
cleanup = lookup_name (get_identifier ("__exception_info"), 0);
- cleanup = build_function_call (fn, expr_tree_cons
+ cleanup = build_function_call (fn, tree_cons
(NULL_TREE, cleanup, NULL_TREE));
return cleanup;
}
@@ -691,7 +691,7 @@ expand_end_eh_spec (raises)
/* Build up an array of type_infos. */
for (; raises && TREE_VALUE (raises); raises = TREE_CHAIN (raises))
{
- types = expr_tree_cons
+ types = tree_cons
(NULL_TREE, build_eh_type_type (TREE_VALUE (raises)), types);
++count;
}
@@ -731,8 +731,8 @@ expand_end_eh_spec (raises)
}
mark_used (fn);
- tmp = expr_tree_cons (NULL_TREE, build_int_2 (count, 0), expr_tree_cons
- (NULL_TREE, decl, NULL_TREE));
+ tmp = tree_cons (NULL_TREE, build_int_2 (count, 0),
+ tree_cons (NULL_TREE, decl, NULL_TREE));
tmp = build_call (fn, TREE_TYPE (TREE_TYPE (fn)), tmp);
expand_expr (tmp, const0_rtx, VOIDmode, EXPAND_NORMAL);
@@ -872,7 +872,7 @@ alloc_eh_object (type)
}
mark_used (fn);
- exp = build_function_call (fn, expr_tree_cons
+ exp = build_function_call (fn, tree_cons
(NULL_TREE, size_in_bytes (type), NULL_TREE));
exp = build1 (NOP_EXPR, build_pointer_type (type), exp);
return exp;
@@ -1025,9 +1025,9 @@ expand_throw (exp)
}
mark_used (fn);
- e = expr_tree_cons (NULL_TREE, exp, expr_tree_cons
- (NULL_TREE, throw_type, expr_tree_cons
- (NULL_TREE, cleanup, NULL_TREE)));
+ e = tree_cons (NULL_TREE, exp, tree_cons
+ (NULL_TREE, throw_type, tree_cons
+ (NULL_TREE, cleanup, NULL_TREE)));
e = build_function_call (fn, e);
expand_expr (e, const0_rtx, VOIDmode, 0);
}
diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c
index 373afe6..c1f7263 100644
--- a/gcc/cp/expr.c
+++ b/gcc/cp/expr.c
@@ -161,7 +161,7 @@ cplus_expand_expr (exp, target, tmode, modifier)
parameter value. */
mark_addressable (slot);
if (TREE_PERMANENT (args))
- args = expr_tree_cons (0, build1 (ADDR_EXPR, type, slot),
+ args = tree_cons (0, build1 (ADDR_EXPR, type, slot),
TREE_CHAIN (args));
else
TREE_VALUE (args) = build1 (ADDR_EXPR, type, slot);
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index a550a72..fd48f19 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -1196,9 +1196,9 @@ expand_default_init (binfo, true_exp, exp, init, flags)
if (TYPE_USES_VIRTUAL_BASECLASSES (type))
{
if (true_exp == exp)
- parms = expr_tree_cons (NULL_TREE, integer_one_node, parms);
+ parms = tree_cons (NULL_TREE, integer_one_node, parms);
else
- parms = expr_tree_cons (NULL_TREE, integer_zero_node, parms);
+ parms = tree_cons (NULL_TREE, integer_zero_node, parms);
flags |= LOOKUP_HAS_IN_CHARGE;
}
@@ -2266,7 +2266,7 @@ build_new_1 (exp)
susp = suspend_momentary ();
rval = build_op_new_call
- (code, true_type, expr_tree_cons (NULL_TREE, size, placement),
+ (code, true_type, tree_cons (NULL_TREE, size, placement),
LOOKUP_NORMAL | (use_global_new * LOOKUP_GLOBAL));
rval = cp_convert (build_pointer_type (true_type), rval);
@@ -2324,7 +2324,7 @@ build_new_1 (exp)
TREE_SIDE_EFFECTS (exp1) = 1;
rval = cp_convert (build_pointer_type (true_type), rval);
rval = build_compound_expr
- (expr_tree_cons (NULL_TREE, exp1,
+ (tree_cons (NULL_TREE, exp1,
build_expr_list (NULL_TREE, rval)));
}
@@ -2389,7 +2389,7 @@ build_new_1 (exp)
if (rval && TYPE_USES_VIRTUAL_BASECLASSES (true_type))
{
- init = expr_tree_cons (NULL_TREE, integer_one_node, init);
+ init = tree_cons (NULL_TREE, integer_one_node, init);
flags |= LOOKUP_HAS_IN_CHARGE;
}
@@ -2580,24 +2580,24 @@ build_vec_delete_1 (base, maxindex, type, auto_delete_vec, auto_delete,
else
body = NULL_TREE;
- body = expr_tree_cons (NULL_TREE,
+ body = tree_cons (NULL_TREE,
build_delete (ptype, tbase, auto_delete,
LOOKUP_NORMAL|LOOKUP_DESTRUCTOR, 1),
body);
- body = expr_tree_cons (NULL_TREE,
+ body = tree_cons (NULL_TREE,
build_modify_expr (tbase, NOP_EXPR, build (MINUS_EXPR, ptype, tbase, size_exp)),
body);
- body = expr_tree_cons (NULL_TREE,
+ body = tree_cons (NULL_TREE,
build (EXIT_EXPR, void_type_node,
build (EQ_EXPR, boolean_type_node, base, tbase)),
body);
loop = build (LOOP_EXPR, void_type_node, build_compound_expr (body));
- loop = expr_tree_cons (NULL_TREE, tbase_init,
- expr_tree_cons (NULL_TREE, loop, NULL_TREE));
+ loop = tree_cons (NULL_TREE, tbase_init,
+ tree_cons (NULL_TREE, loop, NULL_TREE));
loop = build_compound_expr (loop);
no_destructor:
@@ -2636,8 +2636,8 @@ build_vec_delete_1 (base, maxindex, type, auto_delete_vec, auto_delete,
if (loop && deallocate_expr != integer_zero_node)
{
- body = expr_tree_cons (NULL_TREE, loop,
- expr_tree_cons (NULL_TREE, deallocate_expr, NULL_TREE));
+ body = tree_cons (NULL_TREE, loop,
+ tree_cons (NULL_TREE, deallocate_expr, NULL_TREE));
body = build_compound_expr (body);
}
else
@@ -3240,7 +3240,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
expr = build_scoped_method_call
(ref, base_binfo, dtor_identifier,
build_expr_list (NULL_TREE, this_auto_delete));
- exprstmt = expr_tree_cons (NULL_TREE, expr, exprstmt);
+ exprstmt = tree_cons (NULL_TREE, expr, exprstmt);
}
/* Take care of the remaining baseclasses. */
@@ -3255,7 +3255,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
(ref, base_binfo, dtor_identifier,
build_expr_list (NULL_TREE, integer_zero_node));
- exprstmt = expr_tree_cons (NULL_TREE, expr, exprstmt);
+ exprstmt = tree_cons (NULL_TREE, expr, exprstmt);
}
for (member = TYPE_FIELDS (type); member; member = TREE_CHAIN (member))
@@ -3267,7 +3267,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
tree this_member = build_component_ref (ref, DECL_NAME (member), NULL_TREE, 0);
tree this_type = TREE_TYPE (member);
expr = build_delete (this_type, this_member, integer_two_node, flags, 0);
- exprstmt = expr_tree_cons (NULL_TREE, expr, exprstmt);
+ exprstmt = tree_cons (NULL_TREE, expr, exprstmt);
}
}
@@ -3294,7 +3294,7 @@ build_vbase_delete (type, decl)
{
tree this_addr = convert_force (build_pointer_type (BINFO_TYPE (vbases)),
addr, 0);
- result = expr_tree_cons (NULL_TREE,
+ result = tree_cons (NULL_TREE,
build_delete (TREE_TYPE (this_addr), this_addr,
integer_zero_node,
LOOKUP_NORMAL|LOOKUP_DESTRUCTOR, 0),
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 1ab7f0d..21b09d4 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -2751,9 +2751,9 @@ handle_cp_pragma (pname)
}
pending_vtables
- = perm_tree_cons (NULL_TREE,
- get_identifier (TREE_STRING_POINTER (yylval.ttype)),
- pending_vtables);
+ = tree_cons (NULL_TREE,
+ get_identifier (TREE_STRING_POINTER (yylval.ttype)),
+ pending_vtables);
token = real_yylex ();
if (token != END_OF_LINE)
warning ("trailing characters ignored");
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 7b74443..f71b03e 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -2140,9 +2140,9 @@ emit_thunk (thunk_fndecl)
t = build_int_2 (delta, -1 * (delta < 0));
TREE_TYPE (t) = signed_type (sizetype);
t = fold (build (PLUS_EXPR, TREE_TYPE (a), a, t));
- t = expr_tree_cons (NULL_TREE, t, NULL_TREE);
+ t = tree_cons (NULL_TREE, t, NULL_TREE);
for (a = TREE_CHAIN (a); a; a = TREE_CHAIN (a))
- t = expr_tree_cons (NULL_TREE, a, t);
+ t = tree_cons (NULL_TREE, a, t);
t = nreverse (t);
t = build_call (function, TREE_TYPE (TREE_TYPE (function)), t);
c_expand_return (t);
diff --git a/gcc/cp/parse.c b/gcc/cp/parse.c
index 9ec4903..beca740 100644
--- a/gcc/cp/parse.c
+++ b/gcc/cp/parse.c
@@ -5246,12 +5246,12 @@ case 207:
break;}
case 209:
#line 1075 "parse.y"
-{ yyval.ttype = expr_tree_cons (NULL_TREE, yyval.ttype,
+{ yyval.ttype = tree_cons (NULL_TREE, yyval.ttype,
build_expr_list (NULL_TREE, yyvsp[0].ttype)); ;
break;}
case 210:
#line 1078 "parse.y"
-{ yyval.ttype = expr_tree_cons (NULL_TREE, yyval.ttype,
+{ yyval.ttype = tree_cons (NULL_TREE, yyval.ttype,
build_expr_list (NULL_TREE, error_mark_node)); ;
break;}
case 211:
@@ -6310,7 +6310,7 @@ case 454:
break;}
case 455:
#line 2055 "parse.y"
-{ yyval.ttype = expr_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ;
+{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ;
break;}
case 456:
#line 2058 "parse.y"
@@ -6322,7 +6322,7 @@ case 457:
break;}
case 458:
#line 2062 "parse.y"
-{ yyval.ttype = expr_tree_cons (yyvsp[-2].ttype, yyvsp[0].ttype, yyval.ttype); ;
+{ yyval.ttype = tree_cons (yyvsp[-2].ttype, yyvsp[0].ttype, yyval.ttype); ;
break;}
case 459:
#line 2067 "parse.y"
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index e12d1b2..dcee4ec 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -1072,10 +1072,10 @@ already_scoped_stmt:
nontrivial_exprlist:
expr_no_commas ',' expr_no_commas
- { $$ = expr_tree_cons (NULL_TREE, $$,
+ { $$ = tree_cons (NULL_TREE, $$,
build_expr_list (NULL_TREE, $3)); }
| expr_no_commas ',' error
- { $$ = expr_tree_cons (NULL_TREE, $$,
+ { $$ = tree_cons (NULL_TREE, $$,
build_expr_list (NULL_TREE, error_mark_node)); }
| nontrivial_exprlist ',' expr_no_commas
{ chainon ($$, build_expr_list (NULL_TREE, $3)); }
@@ -2052,14 +2052,14 @@ initlist:
init
{ $$ = build_tree_list (NULL_TREE, $$); }
| initlist ',' init
- { $$ = expr_tree_cons (NULL_TREE, $3, $$); }
+ { $$ = tree_cons (NULL_TREE, $3, $$); }
/* These are for labeled elements. */
| '[' expr_no_commas ']' init
{ $$ = build_expr_list ($2, $4); }
| identifier ':' init
{ $$ = build_expr_list ($$, $3); }
| initlist ',' identifier ':' init
- { $$ = expr_tree_cons ($3, $5, $$); }
+ { $$ = tree_cons ($3, $5, $$); }
;
fn.defpen:
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index a02e17a..a452241 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -912,7 +912,7 @@ register_specialization (spec, tmpl, args)
}
DECL_TEMPLATE_SPECIALIZATIONS (tmpl)
- = perm_tree_cons (args, spec, DECL_TEMPLATE_SPECIALIZATIONS (tmpl));
+ = tree_cons (args, spec, DECL_TEMPLATE_SPECIALIZATIONS (tmpl));
return spec;
}
@@ -951,7 +951,7 @@ register_local_specialization (spec, tmpl, fn)
tree fn;
{
DECL_TEMPLATE_SPECIALIZATIONS (tmpl)
- = perm_tree_cons (fn, spec, DECL_TEMPLATE_SPECIALIZATIONS (tmpl));
+ = tree_cons (fn, spec, DECL_TEMPLATE_SPECIALIZATIONS (tmpl));
return spec;
}
@@ -1090,7 +1090,7 @@ determine_specialization (template_id, decl, targs_out,
continue;
/* Save this template, and the arguments deduced. */
- templates = scratch_tree_cons (targs, tmpl, templates);
+ templates = tree_cons (targs, tmpl, templates);
}
if (templates && TREE_CHAIN (templates))
@@ -1130,7 +1130,7 @@ determine_specialization (template_id, decl, targs_out,
if (tmpl && tmpl != error_mark_node)
{
targs = get_bindings (tmpl, decl, explicit_targs);
- templates = scratch_tree_cons (targs, tmpl, NULL_TREE);
+ templates = tree_cons (targs, tmpl, NULL_TREE);
}
}
@@ -1546,8 +1546,7 @@ check_explicit_specialization (declarator, decl, template_count, flags)
}
/* Set up the DECL_TEMPLATE_INFO for DECL. */
- DECL_TEMPLATE_INFO (decl)
- = perm_tree_cons (tmpl, targs, NULL_TREE);
+ DECL_TEMPLATE_INFO (decl) = tree_cons (tmpl, targs, NULL_TREE);
/* Mangle the function name appropriately. Note that we do
not mangle specializations of non-template member
@@ -2232,8 +2231,8 @@ process_partial_specialization (decl)
return decl;
DECL_TEMPLATE_SPECIALIZATIONS (maintmpl) = CLASSTYPE_TI_SPEC_INFO (type)
- = perm_tree_cons (inner_args, inner_parms,
- DECL_TEMPLATE_SPECIALIZATIONS (maintmpl));
+ = tree_cons (inner_args, inner_parms,
+ DECL_TEMPLATE_SPECIALIZATIONS (maintmpl));
TREE_TYPE (DECL_TEMPLATE_SPECIALIZATIONS (maintmpl)) = type;
return decl;
}
@@ -2547,8 +2546,8 @@ push_template_decl_real (decl, is_friend)
TREE_TYPE (new_tmpl) = TREE_TYPE (decl);
DECL_TI_TEMPLATE (decl) = new_tmpl;
SET_DECL_TEMPLATE_SPECIALIZATION (new_tmpl);
- DECL_TEMPLATE_INFO (new_tmpl) =
- perm_tree_cons (tmpl, args, NULL_TREE);
+ DECL_TEMPLATE_INFO (new_tmpl)
+ = tree_cons (tmpl, args, NULL_TREE);
register_specialization (new_tmpl, tmpl, args);
return decl;
@@ -2604,7 +2603,7 @@ push_template_decl_real (decl, is_friend)
if (primary)
DECL_PRIMARY_TEMPLATE (tmpl) = tmpl;
- info = perm_tree_cons (tmpl, args, NULL_TREE);
+ info = tree_cons (tmpl, args, NULL_TREE);
if (DECL_IMPLICIT_TYPEDEF_P (decl))
{
@@ -3633,8 +3632,7 @@ add_pending_template (d)
if (TI_PENDING_TEMPLATE_FLAG (ti))
return;
- *template_tail = perm_tree_cons
- (build_srcloc_here (), d, NULL_TREE);
+ *template_tail = tree_cons (build_srcloc_here (), d, NULL_TREE);
template_tail = &TREE_CHAIN (*template_tail);
TI_PENDING_TEMPLATE_FLAG (ti) = 1;
}
@@ -3802,7 +3800,7 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope)
return error_mark_node;
TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (parm)
- = perm_tree_cons (template2, arglist2, NULL_TREE);
+ = tree_cons (template2, arglist2, NULL_TREE);
TYPE_SIZE (parm) = 0;
return parm;
}
@@ -5889,7 +5887,7 @@ tsubst_decl (t, args, type, in_decl)
if (gen_tmpl)
{
DECL_TEMPLATE_INFO (r)
- = perm_tree_cons (gen_tmpl, argvec, NULL_TREE);
+ = tree_cons (gen_tmpl, argvec, NULL_TREE);
SET_DECL_IMPLICIT_INSTANTIATION (r);
register_specialization (r, gen_tmpl, argvec);
@@ -6100,7 +6098,7 @@ tsubst_decl (t, args, type, in_decl)
if (ctx)
DECL_EXTERNAL (r) = 1;
- DECL_TEMPLATE_INFO (r) = perm_tree_cons (tmpl, argvec, NULL_TREE);
+ DECL_TEMPLATE_INFO (r) = tree_cons (tmpl, argvec, NULL_TREE);
SET_DECL_IMPLICIT_INSTANTIATION (r);
if (ctx)
register_specialization (r, gen_tmpl, argvec);
@@ -6511,7 +6509,7 @@ tsubst (t, args, complain, in_decl)
return error_mark_node;
TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (r)
- = perm_tree_cons (TYPE_NAME (t), argvec, NULL_TREE);
+ = tree_cons (TYPE_NAME (t), argvec, NULL_TREE);
}
break;
@@ -7674,9 +7672,9 @@ fn_type_unification (fn, explicit_targs, targs, args, return_type,
/* This is a template conversion operator. Use the return types
as well as the argument types. We use it instead of 'this', since
we could be comparing conversions from different classes. */
- parms = scratch_tree_cons (NULL_TREE, TREE_TYPE (fntype),
- TREE_CHAIN (parms));
- args = scratch_tree_cons (NULL_TREE, return_type, TREE_CHAIN (args));
+ parms = tree_cons (NULL_TREE, TREE_TYPE (fntype),
+ TREE_CHAIN (parms));
+ args = tree_cons (NULL_TREE, return_type, TREE_CHAIN (args));
}
/* We allow incomplete unification without an error message here
@@ -9044,8 +9042,7 @@ most_specialized (fns, decl, explicit_args)
args = get_bindings (candidate, decl, explicit_args);
if (args)
- candidates = scratch_tree_cons (NULL_TREE, candidate,
- candidates);
+ candidates = tree_cons (NULL_TREE, candidate, candidates);
}
return most_specialized_instantiation (candidates, explicit_args);
@@ -9909,7 +9906,7 @@ add_maybe_template (d, fns)
return;
}
- *maybe_template_tail = perm_tree_cons (t, d, NULL_TREE);
+ *maybe_template_tail = tree_cons (t, d, NULL_TREE);
maybe_template_tail = &TREE_CHAIN (*maybe_template_tail);
DECL_MAYBE_TEMPLATE (d) = 1;
}
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c
index 4adcc35..fdeefb1 100644
--- a/gcc/cp/repo.c
+++ b/gcc/cp/repo.c
@@ -142,7 +142,7 @@ repo_template_used (t)
if (! IDENTIFIER_REPO_USED (id))
{
IDENTIFIER_REPO_USED (id) = 1;
- pending_repo = perm_tree_cons (NULL_TREE, id, pending_repo);
+ pending_repo = tree_cons (NULL_TREE, id, pending_repo);
}
}
@@ -156,7 +156,7 @@ repo_vtable_used (t)
if (! flag_use_repository)
return;
- pending_repo = perm_tree_cons (NULL_TREE, t, pending_repo);
+ pending_repo = tree_cons (NULL_TREE, t, pending_repo);
}
/* Note that an inline with external linkage has been used, and offer to
@@ -176,7 +176,7 @@ repo_inline_used (fn)
return;
}
- pending_repo = perm_tree_cons (NULL_TREE, fn, pending_repo);
+ pending_repo = tree_cons (NULL_TREE, fn, pending_repo);
}
/* Note that a particular typeinfo node has been used, and offer to
@@ -347,7 +347,7 @@ init_repo (filename)
else
orig = NULL_TREE;
- original_repo = perm_tree_cons (orig, id, original_repo);
+ original_repo = tree_cons (orig, id, original_repo);
}
break;
default:
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index d5d3377..2b4eeaf 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -298,7 +298,7 @@ build_x_typeid (exp)
tree bad = throw_bad_typeid ();
bad = build_compound_expr
- (expr_tree_cons (NULL_TREE, bad, build_expr_list
+ (tree_cons (NULL_TREE, bad, build_expr_list
(NULL_TREE, cp_convert (type, integer_zero_node))));
exp = build (COND_EXPR, type, cond, exp, bad);
}
@@ -676,7 +676,7 @@ build_dynamic_cast_1 (type, expr)
{
expr1 = throw_bad_cast ();
expr1 = build_compound_expr
- (expr_tree_cons (NULL_TREE, expr1,
+ (tree_cons (NULL_TREE, expr1,
build_expr_list (NULL_TREE, cp_convert (type, integer_zero_node))));
TREE_TYPE (expr1) = type;
result = save_expr (result);
@@ -868,7 +868,7 @@ expand_class_desc (tdecl, type)
(NULL_TREE, isvir, tree_cons
(NULL_TREE, access, NULL_TREE)))));
TREE_HAS_CONSTRUCTOR (elt) = TREE_CONSTANT (elt) = TREE_STATIC (elt) = 1;
- elts = expr_tree_cons (NULL_TREE, elt, elts);
+ elts = tree_cons (NULL_TREE, elt, elts);
base_cnt++;
}
#if 0
@@ -895,10 +895,10 @@ expand_class_desc (tdecl, type)
offset = BINFO_OFFSET (vb);
isvir = build_int_2 (1, 0);
- base_list = expr_tree_cons (NULL_TREE, base, base_list);
- isvir_list = expr_tree_cons (NULL_TREE, isvir, isvir_list);
- acc_list = expr_tree_cons (NULL_TREE, access, acc_list);
- off_list = expr_tree_cons (NULL_TREE, offset, off_list);
+ base_list = tree_cons (NULL_TREE, base, base_list);
+ isvir_list = tree_cons (NULL_TREE, isvir, isvir_list);
+ acc_list = tree_cons (NULL_TREE, access, acc_list);
+ off_list = tree_cons (NULL_TREE, offset, off_list);
base_cnt++;
vb = TREE_CHAIN (vb);
@@ -1014,7 +1014,7 @@ expand_attr_desc (tdecl, type)
elems = tree_cons
(NULL_TREE, decay_conversion (tdecl), tree_cons
(NULL_TREE, decay_conversion (name_string), tree_cons
- (NULL_TREE, attrval, expr_tree_cons (NULL_TREE, t, NULL_TREE))));
+ (NULL_TREE, attrval, tree_cons (NULL_TREE, t, NULL_TREE))));
fn = get_identifier ("__rtti_attr");
if (IDENTIFIER_GLOBAL_VALUE (fn))
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 6ce8494..818ab14 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -1333,14 +1333,12 @@ lookup_field_r (binfo, data)
/* This is the first time we noticed an ambiguity. Add
what we previously thought was a reasonable candidate
to the list. */
- lfi->ambiguous = scratch_tree_cons (NULL_TREE, lfi->rval,
- NULL_TREE);
+ lfi->ambiguous = tree_cons (NULL_TREE, lfi->rval, NULL_TREE);
TREE_TYPE (lfi->ambiguous) = error_mark_node;
}
/* Add the new value. */
- lfi->ambiguous = scratch_tree_cons (NULL_TREE, nval,
- lfi->ambiguous);
+ lfi->ambiguous = tree_cons (NULL_TREE, nval, lfi->ambiguous);
TREE_TYPE (lfi->ambiguous) = error_mark_node;
lfi->errstr = "request for member `%D' is ambiguous";
}
@@ -1484,7 +1482,7 @@ lookup_member (xbasetype, name, protect, want_type)
if (rval && is_overloaded_fn (rval))
{
- rval = scratch_tree_cons (basetype_path, rval, NULL_TREE);
+ rval = tree_cons (basetype_path, rval, NULL_TREE);
SET_BASELINK_P (rval);
}
@@ -1774,10 +1772,9 @@ get_virtuals_named_this_r (binfo, data)
idx = lookup_fnfields_here (BINFO_TYPE (binfo), gvnti->name);
if (idx >= 0)
gvnti->fields
- = scratch_tree_cons (binfo,
- TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (type),
- idx),
- gvnti->fields);
+ = tree_cons (binfo,
+ TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (type), idx),
+ gvnti->fields);
return NULL_TREE;
}
@@ -3150,8 +3147,6 @@ reinit_search_statistics ()
#endif /* GATHER_STATISTICS */
}
-#define scratch_tree_cons expr_tree_cons
-
static tree
add_conversions (binfo, data)
tree binfo;
@@ -3178,7 +3173,7 @@ add_conversions (binfo, data)
/* Make sure we don't already have this conversion. */
if (! IDENTIFIER_MARKED (name))
{
- *conversions = scratch_tree_cons (binfo, tmp, *conversions);
+ *conversions = tree_cons (binfo, tmp, *conversions);
IDENTIFIER_MARKED (name) = 1;
}
}
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index e71cf12..2cb6721 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -2522,19 +2522,10 @@ build_srcloc (file, line)
{
tree t;
- /* Make sure that we put these on the permanent obstack; up in
- add_pending_template, we pass this return value into perm_tree_cons,
- which also puts it on the permanent_obstack. However, this wasn't
- explicitly doing the same. */
- register struct obstack *ambient_obstack = current_obstack;
- current_obstack = &permanent_obstack;
-
t = make_node (SRCLOC);
SRCLOC_FILE (t) = file;
SRCLOC_LINE (t) = line;
- current_obstack = ambient_obstack;
-
return t;
}
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 68563f8..b035fbe 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -2833,7 +2833,7 @@ build_x_function_call (function, params, decl)
function = TREE_OPERAND (function, 1);
function = get_member_function_from_ptrfunc (&decl_addr, function);
- params = expr_tree_cons (NULL_TREE, decl_addr, params);
+ params = tree_cons (NULL_TREE, decl_addr, params);
return build_function_call (function, params);
}
@@ -2884,7 +2884,7 @@ build_x_function_call (function, params, decl)
}
else
decl = build_c_cast (ctypeptr, decl);
- params = expr_tree_cons (NULL_TREE, decl, params);
+ params = tree_cons (NULL_TREE, decl, params);
}
return build_function_call (function, params);
@@ -3260,14 +3260,14 @@ convert_arguments (typelist, values, fndecl, flags)
if (parmval == error_mark_node)
return error_mark_node;
- result = expr_tree_cons (NULL_TREE, parmval, result);
+ result = tree_cons (NULL_TREE, parmval, result);
}
else
{
if (TREE_CODE (TREE_TYPE (val)) == REFERENCE_TYPE)
val = convert_from_reference (val);
- result = expr_tree_cons (NULL_TREE,
+ result = tree_cons (NULL_TREE,
convert_arg_to_ellipsis (val),
result);
}
@@ -3291,7 +3291,7 @@ convert_arguments (typelist, values, fndecl, flags)
if (parmval == error_mark_node)
return error_mark_node;
- result = expr_tree_cons (0, parmval, result);
+ result = tree_cons (0, parmval, result);
typetail = TREE_CHAIN (typetail);
/* ends with `...'. */
if (typetail == NULL_TREE)
@@ -5155,7 +5155,7 @@ build_x_compound_expr (list)
result = build_opfncall (COMPOUND_EXPR, LOOKUP_NORMAL,
TREE_VALUE (list), TREE_VALUE (rest), NULL_TREE);
if (result)
- return build_x_compound_expr (expr_tree_cons (NULL_TREE, result,
+ return build_x_compound_expr (tree_cons (NULL_TREE, result,
TREE_CHAIN (rest)));
if (! TREE_SIDE_EFFECTS (TREE_VALUE (list)))
@@ -5174,7 +5174,7 @@ build_x_compound_expr (list)
#endif
return build_compound_expr
- (expr_tree_cons (NULL_TREE, TREE_VALUE (list),
+ (tree_cons (NULL_TREE, TREE_VALUE (list),
build_expr_list (NULL_TREE,
build_x_compound_expr (rest))));
}
@@ -6182,18 +6182,18 @@ build_ptrmemfunc1 (type, delta, idx, pfn, delta2)
if (pfn)
{
u = build_nt (CONSTRUCTOR, NULL_TREE,
- expr_tree_cons (pfn_identifier, pfn, NULL_TREE));
+ tree_cons (pfn_identifier, pfn, NULL_TREE));
}
else
{
u = build_nt (CONSTRUCTOR, NULL_TREE,
- expr_tree_cons (delta2_identifier, delta2, NULL_TREE));
+ tree_cons (delta2_identifier, delta2, NULL_TREE));
}
u = build_nt (CONSTRUCTOR, NULL_TREE,
- expr_tree_cons (NULL_TREE, delta,
- expr_tree_cons (NULL_TREE, idx,
- expr_tree_cons (NULL_TREE, u, NULL_TREE))));
+ tree_cons (NULL_TREE, delta,
+ tree_cons (NULL_TREE, idx,
+ tree_cons (NULL_TREE, u, NULL_TREE))));
return digest_init (type, u, (tree*)0);
#else
@@ -6212,14 +6212,14 @@ build_ptrmemfunc1 (type, delta, idx, pfn, delta2)
{
allconstant = TREE_CONSTANT (pfn);
allsimple = !! initializer_constant_valid_p (pfn, TREE_TYPE (pfn));
- u = expr_tree_cons (pfn_field, pfn, NULL_TREE);
+ u = tree_cons (pfn_field, pfn, NULL_TREE);
}
else
{
delta2 = convert_and_check (delta_type_node, delta2);
allconstant = TREE_CONSTANT (delta2);
allsimple = !! initializer_constant_valid_p (delta2, TREE_TYPE (delta2));
- u = expr_tree_cons (delta2_field, delta2, NULL_TREE);
+ u = tree_cons (delta2_field, delta2, NULL_TREE);
}
delta = convert_and_check (delta_type_node, delta);
@@ -6231,9 +6231,9 @@ build_ptrmemfunc1 (type, delta, idx, pfn, delta2)
&& initializer_constant_valid_p (idx, TREE_TYPE (idx));
u = build (CONSTRUCTOR, subtype, NULL_TREE, u);
- u = expr_tree_cons (delta_field, delta,
- expr_tree_cons (idx_field, idx,
- expr_tree_cons (pfn_or_delta2_field, u, NULL_TREE)));
+ u = tree_cons (delta_field, delta,
+ tree_cons (idx_field, idx,
+ tree_cons (pfn_or_delta2_field, u, NULL_TREE)));
u = build (CONSTRUCTOR, type, NULL_TREE, u);
TREE_CONSTANT (u) = allconstant;
TREE_STATIC (u) = allconstant && allsimple;