aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/misc.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2010-04-17 08:24:16 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2010-04-17 08:24:16 +0000
commit6936c61a5cb4cf17d8badafa6d547305cdef63ee (patch)
tree7dbe01ff367112db96a6d1b2f767aab61bd2f627 /gcc/ada/gcc-interface/misc.c
parent1081f5a7c753c0850becc3758adee1ce3f968ec9 (diff)
downloadgcc-6936c61a5cb4cf17d8badafa6d547305cdef63ee.zip
gcc-6936c61a5cb4cf17d8badafa6d547305cdef63ee.tar.gz
gcc-6936c61a5cb4cf17d8badafa6d547305cdef63ee.tar.bz2
back-end.adb (Call_Back_End): Pass Standard_Character to gigi.
* 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. From-SVN: r158462
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
-rw-r--r--gcc/ada/gcc-interface/misc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index 52fe65a..f3e7b1b 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -389,8 +389,9 @@ static bool
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
@@ -398,6 +399,7 @@ gnat_init (void)
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);