From 136e64db5ea4eda85d7a9916d3ae9f4fa528b1e3 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 5 Feb 2004 22:07:33 +0000 Subject: utils.c (create_param_decl): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. ada/ * ada/utils.c (create_param_decl): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. gcc/ * config/cris/cris.h: Replace PROMOTE_PROTOTYPES with TARGET_PROMOTE_PROTOTYPES. cp/ * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. java/ * Make-lang.in (java/decl.o, java/expr.o, java/parse.o): Depend on target.h. * decl.c: Include target.h. (start_java_method): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. * expr.c: Include target.h. (pop_arguments): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. * parse.y: Include target.h. (start_complete_expand_method): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. From-SVN: r77345 --- gcc/ada/utils.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gcc/ada/utils.c') diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index dbc71a4..9417691 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -1540,11 +1540,11 @@ create_param_decl (tree param_name, tree param_type, int readonly) { tree param_decl = build_decl (PARM_DECL, param_name, param_type); - /* Honor the PROMOTE_PROTOTYPES target macro, as not doing so can + /* Honor targetm.calls.promote_prototypes(), as not doing so can lead to various ABI violations. */ -#ifdef PROMOTE_PROTOTYPES - if ((TREE_CODE (param_type) == INTEGER_TYPE - || TREE_CODE (param_type) == ENUMERAL_TYPE) + if (targetm.calls.promote_prototypes (param_type) + && (TREE_CODE (param_type) == INTEGER_TYPE + || TREE_CODE (param_type) == ENUMERAL_TYPE) && TYPE_PRECISION (param_type) < TYPE_PRECISION (integer_type_node)) { /* We have to be careful about biased types here. Make a subtype @@ -1562,7 +1562,6 @@ create_param_decl (tree param_name, tree param_type, int readonly) else param_type = integer_type_node; } -#endif DECL_ARG_TYPE (param_decl) = param_type; DECL_ARG_TYPE_AS_WRITTEN (param_decl) = param_type; -- cgit v1.1