* gcc-interface/gigi.h (gigi): Add standard_character parameter.
(CHAR_TYPE_SIZE, SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE,
LONG_LONG_TYPE_SIZE, FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE,
LONG_DOUBLE_TYPE_SIZE, SIZE_TYPE): Delete.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Call
rm_size.
* gcc-interface/misc.c (gnat_init): Set signedness of char as per
flag_signed_char. Tag sizetype with "size_type" moniker.
* gcc-interface/trans.c (gigi): Add standard_character parameter.
Remove useless built-in types. Equate unsigned_char_type_node to
Standard.Character. Use it instead of char_type_node throughout.
(Attribute_to_gnu): Likewise.
(gnat_to_gnu): Likewise.
* gcc-interface/utils2.c (build_call_raise): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158462
138bc75d-0d04-0410-961f-
82ee72b054a4
2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
+ * back-end.adb (Call_Back_End): Pass Standard_Character to gigi.
+ * gcc-interface/gigi.h (gigi): Add standard_character parameter.
+ (CHAR_TYPE_SIZE, SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE,
+ LONG_LONG_TYPE_SIZE, FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE,
+ LONG_DOUBLE_TYPE_SIZE, SIZE_TYPE): Delete.
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Call
+ rm_size.
+ * gcc-interface/misc.c (gnat_init): Set signedness of char as per
+ flag_signed_char. Tag sizetype with "size_type" moniker.
+ * gcc-interface/trans.c (gigi): Add standard_character parameter.
+ Remove useless built-in types. Equate unsigned_char_type_node to
+ Standard.Character. Use it instead of char_type_node throughout.
+ (Attribute_to_gnu): Likewise.
+ (gnat_to_gnu): Likewise.
+ * gcc-interface/utils2.c (build_call_raise): Likewise.
+
+2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/gigi.h (enum standard_datatypes): Add new values
ADT_sbitsize_one_node and ADT_sbitsize_unit_node.
(sbitsize_one_node): New macro.
{
tree gnu_index_type = get_unpadded_type (Etype (gnat_index));
const int prec_comp
- = compare_tree_int (TYPE_RM_SIZE (gnu_index_type),
+ = compare_tree_int (rm_size (gnu_index_type),
TYPE_PRECISION (sizetype));
const bool subrange_p = (prec_comp < 0
&& (TYPE_UNSIGNED (gnu_index_type)
gnat_init (void)
{
/* Do little here, most of the standard declarations are set up after the
- front-end has been run. */
- build_common_tree_nodes (true, true);
+ front-end has been run. Use the same `char' as C, this doesn't really
+ matter since we'll use the explicit `unsigned char' for Character. */
+ build_common_tree_nodes (flag_signed_char, true);
/* In Ada, we use a signed type for SIZETYPE. Use the signed type
corresponding to the width of Pmode. In most cases when ptr_mode
But we get far better code using the width of Pmode. */
size_type_node = gnat_type_for_mode (Pmode, 0);
set_sizetype (size_type_node);
+ TYPE_NAME (sizetype) = get_identifier ("size_type");
/* In Ada, we use an unsigned 8-bit type for the default boolean type. */
boolean_type_node = make_unsigned_type (8);
= (gnat_node != Empty && Sloc (gnat_node) != No_Location)
? Get_Logical_Line_Number (Sloc(gnat_node)) : input_line;
- TREE_TYPE (filename)
- = build_array_type (char_type_node, build_index_type (size_int (len)));
+ TREE_TYPE (filename) = build_array_type (unsigned_char_type_node,
+ build_index_type (size_int (len)));
return
build_call_2_expr (fndecl,
- build1 (ADDR_EXPR, build_pointer_type (char_type_node),
+ build1 (ADDR_EXPR,
+ build_pointer_type (unsigned_char_type_node),
filename),
build_int_cst (NULL_TREE, line_number));
}