diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-12 01:12:59 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-12 01:12:59 +0000 |
commit | 2243fa67e722857b42deb3ef6a1059d3ec2b3cae (patch) | |
tree | 21262e14b6ea734d629371b88b3f1eeb361b27dc /gcc/cp/cvt.c | |
parent | a091667d93f7eca6cf206e0a710fc8122881f4c7 (diff) | |
download | ppe42-gcc-2243fa67e722857b42deb3ef6a1059d3ec2b3cae.tar.gz ppe42-gcc-2243fa67e722857b42deb3ef6a1059d3ec2b3cae.zip |
* cp-tree.def (CLEANUP_STMT): New node.
* cp-tree.h (language_function): Add name_declared.
(current_function_name_declared): New macro.
(CLEANUP_DECL): New macro.
(CLEANUP_EXPR): Likewise.
(emit_local_var): Likewise.
(finish_decl_cleanup): New function.
* cvt.c (build_up_reference): Simplify.
(ocp_convert): Remove dead code.
* decl.c (start_decl): Remove call to add_decl_stmt.
(grok_reference_init): Adjust, to handle bindings temporaries to
references. Remove dead code.
(initialize_local_var): Don't generate RTL for
declarations here, or build cleanups here. Don't fuss with
obstacks. Replace expand_start_target_temps calls with explicit
setting of stms_are_full_exprs_p.
(destroy_local_var): New function.
(emit_local_var): Likewise.
(cp_finish_decl): Use them, as appropriate.
(start_function): Announce template functions.
(store_parm_decls): Don't call declare_function_name here.
(finish_stmt): Don't start emit base-initialization code when just
building the statement-tree.
* init.c (create_temporary_var): Move add_decl_stmt call ...
(get_temp_regvar): Here.
* pt.c (tsubst_expr): Make DECL_INITIAL look like what
cp_finish_decl would expect. Don't call add_decl_stmt.
* semantics.c (begin_compound_stmt): Call declare_function_name,
if appropriate.
(finish_decl_cleanup): New function.
(expand_stmt): Use emit_local_var to output variables.
(expand_body): Set current_funtion_name_declared.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29348 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r-- | gcc/cp/cvt.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 7ea55bd8595..382a9b2660d 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -345,8 +345,6 @@ build_up_reference (type, arg, flags) if ((flags & DIRECT_BIND) && ! real_lvalue_p (arg)) { - tree compound_stmt; - /* Create a new temporary variable. */ tree targ = arg; if (toplevel_bindings_p ()) @@ -355,25 +353,12 @@ build_up_reference (type, arg, flags) { arg = pushdecl (build_decl (VAR_DECL, NULL_TREE, argtype)); DECL_ARTIFICIAL (arg) = 1; - /* Generate code to initialize it. We wrap it in a - statement-expression so that when we are building a - statement-tree we will have a representation of this - declaration. */ - begin_init_stmts (&stmt_expr, &compound_stmt); } /* Process the initializer for the declaration. */ DECL_INITIAL (arg) = targ; cp_finish_decl (arg, targ, NULL_TREE, 0, LOOKUP_ONLYCONVERTING|DIRECT_BIND); - - /* And wrap up the statement-expression, if necessary. */ - if (!toplevel_bindings_p ()) - { - if (building_stmt_tree ()) - add_decl_stmt (arg); - stmt_expr = finish_init_stmts (stmt_expr, compound_stmt); - } } else if (!(flags & DIRECT_BIND) && ! lvalue_p (arg)) { @@ -719,13 +704,6 @@ ocp_convert (type, expr, convtype, flags) return e; } -#if 0 - /* This is incorrect. A truncation can't be stripped this way. - Extensions will be stripped by the use of get_unwidened. */ - if (TREE_CODE (e) == NOP_EXPR) - return cp_convert (type, TREE_OPERAND (e, 0)); -#endif - /* Just convert to the type of the member. */ if (code == OFFSET_TYPE) { @@ -733,13 +711,6 @@ ocp_convert (type, expr, convtype, flags) code = TREE_CODE (type); } -#if 0 - if (code == REFERENCE_TYPE) - return fold (convert_to_reference (type, e, convtype, flags, NULL_TREE)); - else if (TREE_CODE (TREE_TYPE (e)) == REFERENCE_TYPE) - e = convert_from_reference (e); -#endif - if (TREE_CODE (e) == OFFSET_REF) e = resolve_offset_ref (e); |