aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/cuintp.c18
-rw-r--r--gcc/ada/trans.c18
-rw-r--r--gcc/ada/utils.c2
-rw-r--r--gcc/ada/utils2.c4
5 files changed, 28 insertions, 21 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2819c7b..6316847 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
+
+ * cuintp.c (UI_To_gnu): Use build_int_cst..
+ * trans.c (Exception_Handler_to_gnu_sjlj, gnat_to_gnu): Likewise.
+ * utils.c (init_gigi_decls): Likewise.
+ * utils2.c (build_call_raise): Likewise.
+
2004-08-13 Olivier Hainque <hainque@act-europe.fr>
* decl.c (gnat_to_gnu_entity) <E_Variable>: When building an allocator
diff --git a/gcc/ada/cuintp.c b/gcc/ada/cuintp.c
index 3b8495c..c0338af 100644
--- a/gcc/ada/cuintp.c
+++ b/gcc/ada/cuintp.c
@@ -62,8 +62,10 @@ UI_To_gnu (Uint Input, tree type)
tree gnu_ret;
if (Input <= Uint_Direct_Last)
- gnu_ret = convert (type, build_int_2 (Input - Uint_Direct_Bias,
- Input < Uint_Direct_Bias ? -1 : 0));
+ gnu_ret = convert (type, build_int_cst (NULL_TREE,
+ Input - Uint_Direct_Bias,
+ Input < Uint_Direct_Bias
+ ? -1 : 0));
else
{
Int Idx = Uints_Ptr[Input].Loc;
@@ -74,26 +76,26 @@ UI_To_gnu (Uint Input, tree type)
tree comp_type
= (TYPE_PRECISION (type) >= TYPE_PRECISION (integer_type_node)
? type : integer_type_node);
- tree gnu_base = convert (comp_type, build_int_2 (Base, 0));
+ tree gnu_base = build_int_cst (comp_type, Base, 0);
if (Length <= 0)
abort ();
- gnu_ret = convert (comp_type, build_int_2 (First, First < 0 ? -1 : 0));
+ gnu_ret = build_int_cst (comp_type, First, First < 0 ? -1 : 0);
if (First < 0)
for (Idx++, Length--; Length; Idx++, Length--)
gnu_ret = fold (build (MINUS_EXPR, comp_type,
fold (build (MULT_EXPR, comp_type,
gnu_ret, gnu_base)),
- convert (comp_type,
- build_int_2 (Udigits_Ptr[Idx], 0))));
+ build_int_cst (comp_type,
+ Udigits_Ptr[Idx], 0)));
else
for (Idx++, Length--; Length; Idx++, Length--)
gnu_ret = fold (build (PLUS_EXPR, comp_type,
fold (build (MULT_EXPR, comp_type,
gnu_ret, gnu_base)),
- convert (comp_type,
- build_int_2 (Udigits_Ptr[Idx], 0))));
+ build_int_cst (comp_type,
+ Udigits_Ptr[Idx], 0)));
}
gnu_ret = convert (type, gnu_ret);
diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c
index 91b0518..e004002 100644
--- a/gcc/ada/trans.c
+++ b/gcc/ada/trans.c
@@ -2217,8 +2217,8 @@ Exception_Handler_to_gnu_sjlj (Node_Id gnat_node)
= build_binary_op
(TRUTH_ORIF_EXPR, integer_type_node,
build_binary_op (EQ_EXPR, integer_type_node, gnu_comp,
- convert (TREE_TYPE (gnu_comp),
- build_int_2 ('V', 0))),
+ build_int_cst (TREE_TYPE (gnu_comp),
+ 'V', 0)),
this_choice);
}
}
@@ -2504,8 +2504,8 @@ gnat_to_gnu (Node_Id gnat_node)
if (Present (Entity (gnat_node)))
gnu_result = DECL_INITIAL (get_gnu_tree (Entity (gnat_node)));
else
- gnu_result = convert (gnu_result_type,
- build_int_2 (Char_Literal_Value (gnat_node), 0));
+ gnu_result = build_int_cst (gnu_result_type,
+ Char_Literal_Value (gnat_node), 0);
break;
case N_Real_Literal:
@@ -2617,12 +2617,10 @@ gnat_to_gnu (Node_Id gnat_node)
for (i = 0; i < length; i++)
{
gnu_list
- = tree_cons (gnu_idx,
- convert (TREE_TYPE (gnu_result_type),
- build_int_2
- (Get_String_Char (gnat_string, i + 1),
- 0)),
- gnu_list);
+ = tree_cons (gnu_idx, build_int_cst
+ (TREE_TYPE (gnu_result_type),
+ Get_String_Char (gnat_string, i + 1), 0),
+ gnu_list);
gnu_idx = int_const_binop (PLUS_EXPR, gnu_idx, integer_one_node,
0);
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index 4f23629..ff57b9a 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -580,7 +580,7 @@ init_gigi_decls (tree long_long_float_type, tree exception_type)
/* Make the types and functions used for exception processing. */
jmpbuf_type
= build_array_type (gnat_type_for_mode (Pmode, 0),
- build_index_type (build_int_2 (5, 0)));
+ build_index_type (build_int_cst (NULL_TREE, 5, 0)));
create_type_decl (get_identifier ("JMPBUF_T"), jmpbuf_type, NULL,
false, true, Empty);
jmpbuf_ptr_type = build_pointer_type (jmpbuf_type);
diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c
index 6d8ba35..726c9f2 100644
--- a/gcc/ada/utils2.c
+++ b/gcc/ada/utils2.c
@@ -1444,13 +1444,13 @@ build_call_raise (int msg)
TREE_TYPE (filename)
= build_array_type (char_type_node,
- build_index_type (build_int_2 (len, 0)));
+ build_index_type (build_int_cst (NULL_TREE, len, 0)));
return
build_call_2_expr (fndecl,
build1 (ADDR_EXPR, build_pointer_type (char_type_node),
filename),
- build_int_2 (input_line, 0));
+ build_int_cst (NULL_TREE, input_line, 0));
}
/* Return a CONSTRUCTOR of TYPE whose list is LIST. */