aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2008-09-09 08:56:58 +0000
committerPaolo Bonzini <bonzini@gcc.gnu.org>2008-09-09 08:56:58 +0000
commit0c03f46fcb7815e5da15a37abbbb8c40daa5cc48 (patch)
tree37848acf141412c81415c91c89ffd7eab8980776 /gcc
parent6efbd94a33a53ac4cb6d3c5585c27f529713b9bb (diff)
downloadgcc-0c03f46fcb7815e5da15a37abbbb8c40daa5cc48.zip
gcc-0c03f46fcb7815e5da15a37abbbb8c40daa5cc48.tar.gz
gcc-0c03f46fcb7815e5da15a37abbbb8c40daa5cc48.tar.bz2
c-common.c (c_expand_decl): Remove.
2008-09-09 Paolo Bonzini <bonzini@gnu.org> * c-common.c (c_expand_decl): Remove. * c-common.h (anon_aggr_type_p): Remove prototype. (DECL_ANON_UNION_ELEMS): Remove. * c-objc-common.h (LANG_HOOKS_EXPAND_DECL): Remove. * c-decl.c (anon_aggr_type_p): Remove. * langhooks-def.h (LANG_HOOKS_EXPAND_DECL): Remove. (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_EXPAND_DECL. * langhooks.h (struct lang_hooks): Remove expand_decl. * langhooks.c (lhd_expand_decl): Remove. * stmt.c (expand_anon_union_decl): Remove. * tree.h (expand_anon_union_decl): Remove prototype. cp: 2008-09-09 Paolo Bonzini <bonzini@gnu.org> * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove. * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS. * semantics.c (anon_aggr_type_p): Remove. From-SVN: r140138
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/c-common.c22
-rw-r--r--gcc/c-common.h6
-rw-r--r--gcc/c-decl.c9
-rw-r--r--gcc/c-objc-common.h2
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/cp-objcp-common.h2
-rw-r--r--gcc/cp/cp-tree.h3
-rw-r--r--gcc/cp/semantics.c10
-rw-r--r--gcc/langhooks-def.h3
-rw-r--r--gcc/langhooks.c12
-rw-r--r--gcc/langhooks.h4
-rw-r--r--gcc/stmt.c60
-rw-r--r--gcc/tree.h1
14 files changed, 20 insertions, 134 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a34ad21..67a3eb6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,17 @@
+2008-09-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * c-common.c (c_expand_decl): Remove.
+ * c-common.h (anon_aggr_type_p): Remove prototype.
+ (DECL_ANON_UNION_ELEMS): Remove.
+ * c-objc-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
+ * c-decl.c (anon_aggr_type_p): Remove.
+ * langhooks-def.h (LANG_HOOKS_EXPAND_DECL): Remove.
+ (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_EXPAND_DECL.
+ * langhooks.h (struct lang_hooks): Remove expand_decl.
+ * langhooks.c (lhd_expand_decl): Remove.
+ * stmt.c (expand_anon_union_decl): Remove.
+ * tree.h (expand_anon_union_decl): Remove prototype.
+
2008-08-09 Andy Hutchinson <hutchinsonandy@aim.com>
PR target/36609
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 8c9e48c..a810bea 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -983,28 +983,6 @@ fname_as_string (int pretty_p)
return namep;
}
-/* Expand DECL if it declares an entity not handled by the
- common code. */
-
-int
-c_expand_decl (tree decl)
-{
- if (TREE_CODE (decl) == VAR_DECL && !TREE_STATIC (decl))
- {
- /* Let the back-end know about this variable. */
- if (!anon_aggr_type_p (TREE_TYPE (decl)))
- emit_local_var (decl);
- else
- expand_anon_union_decl (decl, NULL_TREE,
- DECL_ANON_UNION_ELEMS (decl));
- }
- else
- return 0;
-
- return 1;
-}
-
-
/* Return the VAR_DECL for a const char array naming the current
function. If the VAR_DECL has not yet been created, create it
now. RID indicates how it should be formatted and IDENTIFIER_NODE
diff --git a/gcc/c-common.h b/gcc/c-common.h
index d6f8d05..96c5fa0 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -800,12 +800,6 @@ extern void finish_file (void);
#define COMPOUND_LITERAL_EXPR_DECL(NODE) \
DECL_EXPR_DECL (COMPOUND_LITERAL_EXPR_DECL_STMT (NODE))
-extern int anon_aggr_type_p (const_tree);
-
-/* For a VAR_DECL that is an anonymous union, these are the various
- sub-variables that make up the anonymous union. */
-#define DECL_ANON_UNION_ELEMS(NODE) DECL_ARGUMENTS ((NODE))
-
/* In a FIELD_DECL, nonzero if the decl was originally a bitfield. */
#define DECL_C_BIT_FIELD(NODE) \
(DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) == 1)
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 5a60063..ae8861e 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -6978,15 +6978,6 @@ current_stmt_tree (void)
return &c_stmt_tree;
}
-/* Nonzero if TYPE is an anonymous union or struct type. Always 0 in
- C. */
-
-int
-anon_aggr_type_p (const_tree ARG_UNUSED (node))
-{
- return 0;
-}
-
/* Return the global value of T as a symbol. */
tree
diff --git a/gcc/c-objc-common.h b/gcc/c-objc-common.h
index 9c73fdd..65445ae 100644
--- a/gcc/c-objc-common.h
+++ b/gcc/c-objc-common.h
@@ -45,8 +45,6 @@ extern void c_initialize_diagnostics (diagnostic_context *);
#define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set
#undef LANG_HOOKS_EXPAND_EXPR
#define LANG_HOOKS_EXPAND_EXPR c_expand_expr
-#undef LANG_HOOKS_EXPAND_DECL
-#define LANG_HOOKS_EXPAND_DECL c_expand_decl
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable
#undef LANG_HOOKS_PARSE_FILE
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index cd5b52c..6331615 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
+ * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
+ * semantics.c (anon_aggr_type_p): Remove.
+
2008-09-06 Jason Merrill <jason@redhat.com>
PR c++/37302
diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h
index a7d4f89..db78f94 100644
--- a/gcc/cp/cp-objcp-common.h
+++ b/gcc/cp/cp-objcp-common.h
@@ -52,8 +52,6 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
#define LANG_HOOKS_GET_ALIAS_SET cxx_get_alias_set
#undef LANG_HOOKS_EXPAND_EXPR
#define LANG_HOOKS_EXPAND_EXPR c_expand_expr
-#undef LANG_HOOKS_EXPAND_DECL
-#define LANG_HOOKS_EXPAND_DECL c_expand_decl
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE c_common_parse_file
#undef LANG_HOOKS_STATICP
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 4f6716b..a39e9da 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -175,9 +175,6 @@ framework extensions, you must include this file before toplev.h, not after.
to which the vptr should be initialized. Use get_vtbl_decl_for_binfo
to extract the VAR_DECL for the complete vtable.
- DECL_ARGUMENTS
- For a VAR_DECL this is DECL_ANON_UNION_ELEMS.
-
DECL_VINDEX
This field is NULL for a non-virtual function. For a virtual
function, it is eventually set to an INTEGER_CST indicating the
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index e044a43..cfd06bb 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -429,16 +429,6 @@ add_decl_expr (tree decl)
add_stmt (r);
}
-/* Nonzero if TYPE is an anonymous union or struct type. We have to use a
- flag for this because "A union for which objects or pointers are
- declared is not an anonymous union" [class.union]. */
-
-int
-anon_aggr_type_p (const_tree node)
-{
- return ANON_AGGR_TYPE_P (node);
-}
-
/* Finish a scope. */
tree
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index 7f8de5b..37b5905 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -51,7 +51,6 @@ extern const char *lhd_decl_printable_name (tree, int);
extern const char *lhd_dwarf_name (tree, int);
extern int lhd_types_compatible_p (tree, tree);
extern rtx lhd_expand_expr (tree, rtx, enum machine_mode, int, rtx *);
-extern int lhd_expand_decl (tree);
extern void lhd_print_error_function (struct diagnostic_context *,
const char *, struct diagnostic_info *);
extern void lhd_set_decl_assembler_name (tree);
@@ -93,7 +92,6 @@ extern void lhd_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *,
#define LANG_HOOKS_MISSING_NORETURN_OK_P hook_bool_tree_true
#define LANG_HOOKS_GET_ALIAS_SET lhd_get_alias_set
#define LANG_HOOKS_EXPAND_EXPR lhd_expand_expr
-#define LANG_HOOKS_EXPAND_DECL lhd_expand_decl
#define LANG_HOOKS_FINISH_INCOMPLETE_DECL lhd_do_nothing_t
#define LANG_HOOKS_STATICP lhd_staticp
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL lhd_do_nothing_t
@@ -243,7 +241,6 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_MISSING_NORETURN_OK_P, \
LANG_HOOKS_GET_ALIAS_SET, \
LANG_HOOKS_EXPAND_EXPR, \
- LANG_HOOKS_EXPAND_DECL, \
LANG_HOOKS_FINISH_INCOMPLETE_DECL, \
LANG_HOOKS_MARK_ADDRESSABLE, \
LANG_HOOKS_STATICP, \
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 4d44102..ebbec95 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -227,18 +227,6 @@ lhd_expand_expr (tree ARG_UNUSED (t), rtx ARG_UNUSED (r),
gcc_unreachable ();
}
-/* The default language-specific function for expanding a decl. After
- the language-independent cases are handled, this function will be
- called. If this function is not defined, it is assumed that
- declarations other than those for variables and labels do not require
- any RTL generation. */
-
-int
-lhd_expand_decl (tree ARG_UNUSED (t))
-{
- return 0;
-}
-
/* This is the default decl_printable_name function. */
const char *
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index a10ce48..2d62f99 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -294,10 +294,6 @@ struct lang_hooks
Fourth argument is actually an enum expand_modifier. */
rtx (*expand_expr) (tree, rtx, enum machine_mode, int, rtx *);
- /* Called by expand_expr to generate the definition of a decl. Returns
- 1 if handled, 0 otherwise. */
- int (*expand_decl) (tree);
-
/* Function to finish handling an incomplete decl at the end of
compilation. Default hook is does nothing. */
void (*finish_incomplete_decl) (tree);
diff --git a/gcc/stmt.c b/gcc/stmt.c
index ee88096..199967e 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1958,66 +1958,6 @@ expand_stack_restore (tree var)
emit_stack_restore (SAVE_BLOCK, sa, NULL_RTX);
}
-/* DECL is an anonymous union. CLEANUP is a cleanup for DECL.
- DECL_ELTS is the list of elements that belong to DECL's type.
- In each, the TREE_VALUE is a VAR_DECL, and the TREE_PURPOSE a cleanup. */
-
-void
-expand_anon_union_decl (tree decl, tree cleanup ATTRIBUTE_UNUSED,
- tree decl_elts)
-{
- rtx x;
- tree t;
-
- /* If any of the elements are addressable, so is the entire union. */
- for (t = decl_elts; t; t = TREE_CHAIN (t))
- if (TREE_ADDRESSABLE (TREE_VALUE (t)))
- {
- TREE_ADDRESSABLE (decl) = 1;
- break;
- }
-
- expand_decl (decl);
- x = DECL_RTL (decl);
-
- /* Go through the elements, assigning RTL to each. */
- for (t = decl_elts; t; t = TREE_CHAIN (t))
- {
- tree decl_elt = TREE_VALUE (t);
- enum machine_mode mode = TYPE_MODE (TREE_TYPE (decl_elt));
- rtx decl_rtl;
-
- /* If any of the elements are addressable, so is the entire
- union. */
- if (TREE_USED (decl_elt))
- TREE_USED (decl) = 1;
-
- /* Propagate the union's alignment to the elements. */
- DECL_ALIGN (decl_elt) = DECL_ALIGN (decl);
- DECL_USER_ALIGN (decl_elt) = DECL_USER_ALIGN (decl);
-
- /* If the element has BLKmode and the union doesn't, the union is
- aligned such that the element doesn't need to have BLKmode, so
- change the element's mode to the appropriate one for its size. */
- if (mode == BLKmode && DECL_MODE (decl) != BLKmode)
- DECL_MODE (decl_elt) = mode
- = mode_for_size_tree (DECL_SIZE (decl_elt), MODE_INT, 1);
-
- if (mode == GET_MODE (x))
- decl_rtl = x;
- else if (MEM_P (x))
- /* (SUBREG (MEM ...)) at RTL generation time is invalid, so we
- instead create a new MEM rtx with the proper mode. */
- decl_rtl = adjust_address_nv (x, mode, 0);
- else
- {
- gcc_assert (REG_P (x));
- decl_rtl = gen_lowpart_SUBREG (mode, x);
- }
- SET_DECL_RTL (decl_elt, decl_rtl);
- }
-}
-
/* Do the insertion of a case label into case_list. The labels are
fed to us in descending order from the sorted vector of case labels used
in the tree part of the middle end. So the list we construct is
diff --git a/gcc/tree.h b/gcc/tree.h
index 43531e5..2dc3e6b 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -5045,7 +5045,6 @@ extern void expand_asm_expr (tree);
extern tree resolve_asm_operand_names (tree, tree, tree);
extern void expand_case (tree);
extern void expand_decl (tree);
-extern void expand_anon_union_decl (tree, tree, tree);
#ifdef HARD_CONST
/* Silly ifdef to avoid having all includers depend on hard-reg-set.h. */
extern tree tree_overlaps_hard_reg_set (tree, HARD_REG_SET *);