aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-09-08 20:12:35 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-08 20:12:35 +0000
commit2a1e9fdd031c5fcdc35b78d4bb6b9800cb82eafc (patch)
treeadf9be1d936c0ca1288a7994361c1272e150dc7e /gcc/cp/semantics.c
parentce3700e3ba57f07a44a2edc9d8b146a7682bb54e (diff)
downloadgcc-2a1e9fdd031c5fcdc35b78d4bb6b9800cb82eafc.zip
gcc-2a1e9fdd031c5fcdc35b78d4bb6b9800cb82eafc.tar.gz
gcc-2a1e9fdd031c5fcdc35b78d4bb6b9800cb82eafc.tar.bz2
cp-tree.h (copy_to_permanent): Remove.
* cp-tree.h (copy_to_permanent): Remove. (permanent_p): Likewise. * decl.c (building_typename_type): Don't use copy_to_permanent. (start_decl): Likewise. (grok_reference_init): Likewise. (cp_finish_decl): Likewise. * init.c (build_new_1): Don't use mapcar. (build_vec_delete_1): Don't use copy_to_permanent. (build_vec_init): Likewise. * parse.y (primary): Likewise. * parse.c: Regenerated. * pt.c (push_template_decl_real): Don't use copy_to_permanent. (lookup_template_class): Likewise. (tsubst_friend_function): Likewise. (instantiate_class_template): Likewise. (tsubst_decl): Likewise. (tsubst): Likewise. (instantiate_template): Likewise. (unify): Likewise. * rtti.c (get_tinfo_fn): Likewise. (build_dynamic_cast): Likewise. * semantics.c (finish_if_stmt_cond): Likewise. (finish_while_stmt_cond): Likewise. (finish_do_stmt): Likewise. (finish_for_cond): Likewise. (finish_for_expr): Likewise. (finish_cleanup): Likewise. (add_decl_stmt): Likewise. (finish_named_return_value): Likewise. (finish_qualified_call_expr): Likewise. * tree.c (perm_manip): Remove. (build_exception_variant): Don't use copy_to_permanent. (permanent_p): Remove. (copy_to_permament): Remove. (build_min_nt): Don't use copy_to_permanent. (build_min): Likewise. (min_tree_cons): Likewise. * typeckc.c (build_static_cast): Likewise. (build_reinterpret_cast): Likewise. (build_const_cast): Likewise. From-SVN: r29211
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index d6099f3..bd44449 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -138,7 +138,7 @@ finish_if_stmt_cond (cond, if_stmt)
if (last_tree != if_stmt)
RECHAIN_STMTS_FROM_LAST (if_stmt, IF_COND (if_stmt));
else
- IF_COND (if_stmt) = copy_to_permanent (cond);
+ IF_COND (if_stmt) = cond;
}
else
{
@@ -236,7 +236,7 @@ finish_while_stmt_cond (cond, while_stmt)
if (last_tree != while_stmt)
RECHAIN_STMTS_FROM_LAST (while_stmt, WHILE_COND (while_stmt));
else
- TREE_OPERAND (while_stmt, 0) = copy_to_permanent (cond);
+ TREE_OPERAND (while_stmt, 0) = cond;
}
else
{
@@ -311,7 +311,7 @@ finish_do_stmt (cond, do_stmt)
tree do_stmt;
{
if (building_stmt_tree ())
- DO_COND (do_stmt) = copy_to_permanent (cond);
+ DO_COND (do_stmt) = cond;
else
{
emit_line_note (input_filename, lineno);
@@ -401,7 +401,7 @@ finish_for_cond (cond, for_stmt)
if (last_tree != for_stmt)
RECHAIN_STMTS_FROM_LAST (for_stmt, FOR_COND (for_stmt));
else
- FOR_COND (for_stmt) = copy_to_permanent (cond);
+ FOR_COND (for_stmt) = cond;
}
else
{
@@ -429,7 +429,7 @@ finish_for_expr (expr, for_stmt)
tree for_stmt;
{
if (building_stmt_tree ())
- FOR_EXPR (for_stmt) = copy_to_permanent (expr);
+ FOR_EXPR (for_stmt) = expr;
/* Don't let the tree nodes for EXPR be discarded
by clear_momentary during the parsing of the next stmt. */
@@ -659,7 +659,7 @@ finish_cleanup (cleanup, try_block)
{
if (building_stmt_tree ())
{
- TRY_HANDLERS (try_block) = copy_to_permanent (cleanup);
+ TRY_HANDLERS (try_block) = cleanup;
CLEANUP_P (try_block) = 1;
}
else
@@ -924,7 +924,6 @@ add_decl_stmt (decl)
tree decl_stmt;
/* We need the type to last until instantiation time. */
- TREE_TYPE (decl) = copy_to_permanent (TREE_TYPE (decl));
decl_stmt = build_min_nt (DECL_STMT, decl);
add_tree (decl_stmt);
}
@@ -990,8 +989,7 @@ finish_named_return_value (return_id, init)
pushdecl (decl);
if (building_stmt_tree ())
- add_tree (build_min_nt (RETURN_INIT, return_id,
- copy_to_permanent (init)));
+ add_tree (build_min_nt (RETURN_INIT, return_id, init));
else
{
cp_finish_decl (decl, init, NULL_TREE, 0, 0);
@@ -1302,8 +1300,7 @@ finish_qualified_call_expr (fn, args)
tree args;
{
if (processing_template_decl)
- return build_min_nt (CALL_EXPR, copy_to_permanent (fn), args,
- NULL_TREE);
+ return build_min_nt (CALL_EXPR, fn, args, NULL_TREE);
else
return build_member_call (TREE_OPERAND (fn, 0),
TREE_OPERAND (fn, 1),