diff options
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/utils.c | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index af2e8e4..3c3cb15 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2004-02-05 Kazu Hirata <kazu@cs.umass.edu> + + * ada/utils.c (create_param_decl): Replace PROMOTE_PROTOTYPES + with targetm.calls.promote_prototypes. + 2004-02-04 Robert Dewar <dewar@gnat.com> * 5gtasinf.adb, 5gtasinf.ads, 5gtaprop.adb, ali.adb, 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; |