diff options
Diffstat (limited to 'gcc/ada')
| -rw-r--r-- | gcc/ada/ChangeLog | 10 | ||||
| -rw-r--r-- | gcc/ada/gigi.h | 6 | ||||
| -rw-r--r-- | gcc/ada/misc.c | 6 | ||||
| -rw-r--r-- | gcc/ada/trans.c | 14 | ||||
| -rw-r--r-- | gcc/ada/utils.c | 6 |
5 files changed, 29 insertions, 13 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 062c7e6..8e7367f 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,13 @@ +2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk> + + * gigi.h (unsigned_type, signed_type, signed_or_unsigned_type): + Rename. + * misc.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, + LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. + * trans.c (tree_transform, convert_with_check): Update. + * utils.c (unsigned_type, signed_type, signed_or_unsigned_type): + Rename. + 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk> * gigi.h (finish_incomplete_decl): Rename. diff --git a/gcc/ada/gigi.h b/gcc/ada/gigi.h index de05d4e..32fcaef 100644 --- a/gcc/ada/gigi.h +++ b/gcc/ada/gigi.h @@ -430,14 +430,14 @@ extern tree gnat_type_for_size PARAMS ((unsigned, int)); extern tree gnat_type_for_mode PARAMS ((enum machine_mode, int)); /* Return the unsigned version of a TYPE_NODE, a scalar type. */ -extern tree unsigned_type PARAMS ((tree)); +extern tree gnat_unsigned_type PARAMS ((tree)); /* Return the signed version of a TYPE_NODE, a scalar type. */ -extern tree signed_type PARAMS ((tree)); +extern tree gnat_signed_type PARAMS ((tree)); /* Return a type the same as TYPE except unsigned or signed according to UNSIGNEDP. */ -extern tree signed_or_unsigned_type PARAMS ((int, tree)); +extern tree gnat_signed_or_unsigned_type PARAMS ((int, tree)); /* This routine is called in tree.c to print an error message for invalid use of an incomplete type. */ diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c index 8edbba4..866afc3 100644 --- a/gcc/ada/misc.c +++ b/gcc/ada/misc.c @@ -124,6 +124,12 @@ static rtx gnat_expand_expr PARAMS ((tree, rtx, enum machine_mode, #define LANG_HOOKS_TYPE_FOR_MODE gnat_type_for_mode #undef LANG_HOOKS_TYPE_FOR_SIZE #define LANG_HOOKS_TYPE_FOR_SIZE gnat_type_for_size +#undef LANG_HOOKS_SIGNED_TYPE +#define LANG_HOOKS_SIGNED_TYPE gnat_signed_type +#undef LANG_HOOKS_UNSIGNED_TYPE +#define LANG_HOOKS_UNSIGNED_TYPE gnat_unsigned_type +#undef LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE +#define LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE gnat_signed_or_unsigned_type const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c index c943a00..19c7b01 100644 --- a/gcc/ada/trans.c +++ b/gcc/ada/trans.c @@ -1348,7 +1348,7 @@ tree_transform (gnat_node) /* 'Length or 'Range_Length. */ { tree gnu_compute_type - = signed_or_unsigned_type + = gnat_signed_or_unsigned_type (0, get_base_type (gnu_result_type)); gnu_result @@ -1867,10 +1867,10 @@ tree_transform (gnat_node) so we may need to choose a different type. */ if (Nkind (gnat_node) == N_Op_Shift_Right && ! TREE_UNSIGNED (gnu_type)) - gnu_type = unsigned_type (gnu_type); + gnu_type = gnat_unsigned_type (gnu_type); else if (Nkind (gnat_node) == N_Op_Shift_Right_Arithmetic && TREE_UNSIGNED (gnu_type)) - gnu_type = signed_type (gnu_type); + gnu_type = gnat_signed_type (gnu_type); if (gnu_type != gnu_result_type) { @@ -4674,17 +4674,17 @@ convert_with_check (gnat_type, gnu_expr, overflow_p, range_p, truncate_p) comparing them properly. Likewise, convert the upper bounds to unsigned types. */ if (INTEGRAL_TYPE_P (gnu_in_basetype) && TREE_UNSIGNED (gnu_in_basetype)) - gnu_in_lb = convert (signed_type (gnu_in_basetype), gnu_in_lb); + gnu_in_lb = convert (gnat_signed_type (gnu_in_basetype), gnu_in_lb); if (INTEGRAL_TYPE_P (gnu_in_basetype) && ! TREE_UNSIGNED (gnu_in_basetype)) - gnu_in_ub = convert (unsigned_type (gnu_in_basetype), gnu_in_ub); + gnu_in_ub = convert (gnat_unsigned_type (gnu_in_basetype), gnu_in_ub); if (INTEGRAL_TYPE_P (gnu_base_type) && TREE_UNSIGNED (gnu_base_type)) - gnu_out_lb = convert (signed_type (gnu_base_type), gnu_out_lb); + gnu_out_lb = convert (gnat_signed_type (gnu_base_type), gnu_out_lb); if (INTEGRAL_TYPE_P (gnu_base_type) && ! TREE_UNSIGNED (gnu_base_type)) - gnu_out_ub = convert (unsigned_type (gnu_base_type), gnu_out_ub); + gnu_out_ub = convert (gnat_unsigned_type (gnu_base_type), gnu_out_ub); /* Check each bound separately and only if the result bound is tighter than the bound on the input type. Note that all the diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index 6d8f637..58b7af6 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -2022,7 +2022,7 @@ gnat_type_for_mode (mode, unsignedp) /* Return the unsigned version of a TYPE_NODE, a scalar type. */ tree -unsigned_type (type_node) +gnat_unsigned_type (type_node) tree type_node; { tree type = gnat_type_for_size (TYPE_PRECISION (type_node), 1); @@ -2046,7 +2046,7 @@ unsigned_type (type_node) /* Return the signed version of a TYPE_NODE, a scalar type. */ tree -signed_type (type_node) +gnat_signed_type (type_node) tree type_node; { tree type = gnat_type_for_size (TYPE_PRECISION (type_node), 0); @@ -2071,7 +2071,7 @@ signed_type (type_node) UNSIGNEDP. */ tree -signed_or_unsigned_type (unsignedp, type) +gnat_signed_or_unsigned_type (unsignedp, type) int unsignedp; tree type; { |
