]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
stmt.c (expand_decl_init): Remove.
authorKazu Hirata <kazu@cs.umass.edu>
Fri, 8 Oct 2004 19:57:18 +0000 (19:57 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Fri, 8 Oct 2004 19:57:18 +0000 (19:57 +0000)
* stmt.c (expand_decl_init): Remove.
* tree.h: Remove the corresponding prototype.

From-SVN: r88788

gcc/ChangeLog
gcc/stmt.c
gcc/tree.h

index 0a21fc1300fc3b0cb0362f01190e58c1c1ce7cf8..9d8d386fad6ef174fc5d81ab7bd28e91be76e585 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-08  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * stmt.c (expand_decl_init): Remove.
+       * tree.h: Remove the corresponding prototype.
+
 2004-10-08  Kazu Hirata  <kazu@cs.umass.edu>
 
        * integrate.c (try_constants, subst_constants, mark_stores):
index 0037b537c84806c70d6222767264c5ed66c18841..3d7ad36b7210099317dd36dc0dfabc6aec139262 100644 (file)
@@ -2051,48 +2051,6 @@ expand_stack_restore (tree var)
 
   emit_stack_restore (SAVE_BLOCK, sa, NULL_RTX);
 }
-\f
-/* Emit code to perform the initialization of a declaration DECL.  */
-
-void
-expand_decl_init (tree decl)
-{
-  int was_used = TREE_USED (decl);
-
-  /* If this is a CONST_DECL, we don't have to generate any code.  Likewise
-     for static decls.  */
-  if (TREE_CODE (decl) == CONST_DECL
-      || TREE_STATIC (decl))
-    return;
-
-  /* Compute and store the initial value now.  */
-
-  push_temp_slots ();
-
-  if (DECL_INITIAL (decl) == error_mark_node)
-    {
-      enum tree_code code = TREE_CODE (TREE_TYPE (decl));
-
-      if (code == INTEGER_TYPE || code == REAL_TYPE || code == ENUMERAL_TYPE
-         || code == POINTER_TYPE || code == REFERENCE_TYPE)
-       expand_assignment (decl, convert (TREE_TYPE (decl), integer_zero_node),
-                          0);
-    }
-  else if (DECL_INITIAL (decl) && TREE_CODE (DECL_INITIAL (decl)) != TREE_LIST)
-    {
-      emit_line_note (DECL_SOURCE_LOCATION (decl));
-      expand_assignment (decl, DECL_INITIAL (decl), 0);
-    }
-
-  /* Don't let the initialization count as "using" the variable.  */
-  TREE_USED (decl) = was_used;
-
-  /* Free any temporaries we made while initializing the decl.  */
-  preserve_temp_slots (NULL_RTX);
-  free_temp_slots ();
-  pop_temp_slots ();
-}
-
 \f
 /* DECL is an anonymous union.  CLEANUP is a cleanup for DECL.
    DECL_ELTS is the list of elements that belong to DECL's type.
index 637fab7e1f77b98d1cc905a899ea1a579ac115a7..89771afa7d2eb5d8a52fc13c4366e85c6c7837d2 100644 (file)
@@ -3466,7 +3466,6 @@ extern bool commutative_tree_code (enum tree_code);
 extern void expand_expr_stmt (tree);
 extern void expand_expr_stmt_value (tree, int, int);
 extern int warn_if_unused_value (tree, location_t);
-extern void expand_decl_init (tree);
 extern void expand_label (tree);
 extern void expand_goto (tree);
 extern void expand_asm (tree, int);