+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.
/* 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);
#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
#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 { \
LANG_HOOKS_TYPE_PROMOTES_TO, \
LANG_HOOKS_REGISTER_BUILTIN_TYPE, \
LANG_HOOKS_INCOMPLETE_TYPE_ERROR, \
+ LANG_HOOKS_TYPE_MAX_SIZE, \
LANG_HOOKS_HASH_TYPES \
}
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, \
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. */
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 *);