diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2010-04-16 15:04:26 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2010-04-16 15:04:26 +0000 |
commit | 860603449e04d4a21c9b695e72232639d8bf4f34 (patch) | |
tree | 1b898ebbf96f3d1614cf445a68b90becfcb2e0a9 /gcc/ada/gcc-interface/misc.c | |
parent | 9b04d6de98437348c1423741c6987ad3c958913b (diff) | |
download | gcc-860603449e04d4a21c9b695e72232639d8bf4f34.zip gcc-860603449e04d4a21c9b695e72232639d8bf4f34.tar.gz gcc-860603449e04d4a21c9b695e72232639d8bf4f34.tar.bz2 |
gigi.h (gnat_init_decl_processing): Delete.
* gcc-interface/gigi.h (gnat_init_decl_processing): Delete.
* gcc-interface/decl.c (gnat_to_gnu_entity): Constify a few variables.
<object>: Do not create the fake PARM_DECL if no debug info is needed.
Do not create the corresponding VAR_DECL of a CONST_DECL for debugging
purposes if no debug info is needed.
Fix formatting. Reorder and add comments.
* gcc-interface/trans.c (gnat_to_gnu) <N_Attribute_Reference>: Constify
variable and remove obsolete comment.
* gcc-interface/utils.c (convert_vms_descriptor64): Tweak comment.
(convert_vms_descriptor32): Likewise.
(convert): Remove dead code.
<UNCONSTRAINED_ARRAY_REF>: Pass the field instead of its name to build
the reference to the P_ARRAY pointer.
<POINTER_TYPE>: Likewise.
(maybe_unconstrained_array) <UNCONSTRAINED_ARRAY_TYPE>: Likewise.
(gnat_init_decl_processing): Delete, move contents to...
* gcc-interface/misc.c (gnat_init): ...here.
From-SVN: r158428
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
-rw-r--r-- | gcc/ada/gcc-interface/misc.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index dbeabc0..1b31890 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -388,9 +388,31 @@ internal_error_function (const char *msgid, va_list *ap) static bool gnat_init (void) { - /* Performs whatever initialization steps needed by the language-dependent - lexical analyzer. */ - gnat_init_decl_processing (); + /* Do little here, most of the standard declarations are set up after the + front-end has been run. */ + build_common_tree_nodes (true, 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 + and Pmode differ, C will use the width of ptr_mode for SIZETYPE. + 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); + + /* In Ada, we use an unsigned 8-bit type for the default boolean type. */ + boolean_type_node = make_unsigned_type (8); + TREE_SET_CODE (boolean_type_node, BOOLEAN_TYPE); + SET_TYPE_RM_MAX_VALUE (boolean_type_node, + build_int_cst (boolean_type_node, 1)); + SET_TYPE_RM_SIZE (boolean_type_node, bitsize_int (1)); + + build_common_tree_nodes_2 (0); + boolean_true_node = TYPE_MAX_VALUE (boolean_type_node); + + ptr_void_type_node = build_pointer_type (void_type_node); + + /* Show that REFERENCE_TYPEs are internal and should be Pmode. */ + internal_reference_types (); /* Add the input filename as the last argument. */ if (main_input_filename) @@ -400,11 +422,9 @@ gnat_init (void) gnat_argv[gnat_argc] = NULL; } + /* Register our internal error function. */ global_dc->internal_error = &internal_error_function; - /* Show that REFERENCE_TYPEs are internal and should be Pmode. */ - internal_reference_types (); - return true; } |