summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-05 14:22:28 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-05 14:22:28 +0000
commitb225134eff8b2bd2b7eb7e890fd5abeb368c6268 (patch)
tree29e664ed85b8be0c9ed83af0463ffda6d2e183de /gcc
parent6cc71317b73b0cebb0af6c468e11ec9c11ba9aba (diff)
downloadgcc-b225134eff8b2bd2b7eb7e890fd5abeb368c6268.tar.gz
* function.c, langhooks-def.h, langhooks.h: Move max_size hook
to type hooks; remove bogus PARAMS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84113 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/function.c2
-rw-r--r--gcc/langhooks-def.h4
-rw-r--r--gcc/langhooks.h8
4 files changed, 12 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 33b69c2f3a6..c2dd100ed31 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * function.c, langhooks-def.h, langhooks.h: Move max_size hook
+ to type hooks; remove bogus PARAMS.
+
2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
* c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1.
diff --git a/gcc/function.c b/gcc/function.c
index 5afb046677c..71003c2d61b 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -852,7 +852,7 @@ assign_temp (tree type_or_decl, int keep, int memory_required,
/* If we still haven't been able to get a size, see if the language
can compute a maximum size. */
if (size == -1
- && (size_tree = lang_hooks.type_max_size (type)) != 0
+ && (size_tree = lang_hooks.types.max_size (type)) != 0
&& host_integerp (size_tree, 1))
size = tree_low_cst (size_tree, 1);
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index 2cbd3fd2d14..da8b6081e54 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -127,7 +127,6 @@ extern int lhd_gimplify_expr (tree *, tree *, tree *);
#define LANG_HOOKS_DECL_PRINTABLE_NAME lhd_decl_printable_name
#define LANG_HOOKS_GET_CALLEE_FNDECL lhd_return_null_tree
#define LANG_HOOKS_EXPR_SIZE lhd_expr_size
-#define LANG_HOOKS_TYPE_MAX_SIZE lhd_return_null_tree
#define LANG_HOOKS_TREE_SIZE lhd_tree_size
#define LANG_HOOKS_TYPES_COMPATIBLE_P lhd_types_compatible_p
#define LANG_HOOKS_UPDATE_DECL_AFTER_SAVING NULL
@@ -223,6 +222,7 @@ extern tree lhd_make_node (enum tree_code);
#define LANG_HOOKS_INCOMPLETE_TYPE_ERROR lhd_incomplete_type_error
#define LANG_HOOKS_TYPE_PROMOTES_TO lhd_type_promotes_to
#define LANG_HOOKS_REGISTER_BUILTIN_TYPE lhd_register_builtin_type
+#define LANG_HOOKS_TYPE_MAX_SIZE lhd_return_null_tree
#define LANG_HOOKS_HASH_TYPES true
#define LANG_HOOKS_FOR_TYPES_INITIALIZER { \
@@ -235,6 +235,7 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_TYPE_PROMOTES_TO, \
LANG_HOOKS_REGISTER_BUILTIN_TYPE, \
LANG_HOOKS_INCOMPLETE_TYPE_ERROR, \
+ LANG_HOOKS_TYPE_MAX_SIZE, \
LANG_HOOKS_HASH_TYPES \
}
@@ -306,7 +307,6 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_GET_CALLEE_FNDECL, \
LANG_HOOKS_PRINT_ERROR_FUNCTION, \
LANG_HOOKS_EXPR_SIZE, \
- LANG_HOOKS_TYPE_MAX_SIZE, \
LANG_HOOKS_UPDATE_DECL_AFTER_SAVING, \
LANG_HOOKS_ATTRIBUTE_TABLE, \
LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, \
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index 6f526ef898d..895d94b16d8 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -141,6 +141,10 @@ struct lang_hooks_for_types
invalid. */
void (*incomplete_type_error) (tree value, tree type);
+ /* Called from assign_temp to return the maximum size, if there is one,
+ for a type. */
+ tree (*max_size) (tree);
+
/* Nonzero if types that are identical are to be hashed so that only
one copy is kept. If a language requires unique types for each
user-specified type, such as Ada, this should be set to TRUE. */
@@ -390,10 +394,6 @@ struct lang_hooks
semantics in cases that it doesn't want to handle specially. */
tree (*expr_size) (tree);
- /* Called from assign_temp to return the maximum size, if there is one,
- for a type. */
- tree (*type_max_size) PARAMS ((tree));
-
/* Update lang specific fields after duplicating function body. */
void (*update_decl_after_saving) (tree, void *);