diff options
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 14 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 15 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/misc.c | 2 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/targtyps.c | 10 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 11 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 4 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/utils2.c | 14 |
7 files changed, 29 insertions, 41 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index a4b3984..2d803fa 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -2055,7 +2055,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) a pointer to the array type since we don't have the array type yet (it will reference the fat pointer via the bounds). */ tem - = create_field_decl (get_identifier ("P_ARRAY"), ptr_void_type_node, + = create_field_decl (get_identifier ("P_ARRAY"), ptr_type_node, gnu_fat_type, NULL_TREE, NULL_TREE, 0, 0); DECL_CHAIN (tem) = create_field_decl (get_identifier ("P_BOUNDS"), gnu_ptr_template, @@ -3889,7 +3889,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) /* If expansion is disabled, the equivalent type of a concurrent type is absent, so build a dummy pointer type. */ else if (type_annotate_only && No (gnat_desig_equiv)) - gnu_type = ptr_void_type_node; + gnu_type = ptr_type_node; /* Finally, handle the default case where we can just elaborate our designated type. */ @@ -4008,7 +4008,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) case E_Access_Protected_Subprogram_Type: case E_Anonymous_Access_Protected_Subprogram_Type: if (type_annotate_only && No (gnat_equiv_type)) - gnu_type = ptr_void_type_node; + gnu_type = ptr_type_node; else { /* The run-time representation is the equivalent type. */ @@ -4232,7 +4232,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) we are only annotating types, break circularities here. */ if (type_annotate_only && is_from_limited_with_of_main (gnat_return_type)) - gnu_return_type = ptr_void_type_node; + gnu_return_type = void_type_node; else gnu_return_type = gnat_to_gnu_type (gnat_return_type); @@ -4343,7 +4343,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) if (type_annotate_only && is_from_limited_with_of_main (gnat_param_type)) { - gnu_param_type = ptr_void_type_node; + gnu_param_type = void_type_node; fake_param_type = true; } else @@ -5681,7 +5681,7 @@ gnat_to_gnu_param (Entity_Id gnat_param, Mechanism_Type mech, if (Convention (gnat_subprog) == Convention_Intrinsic && Present (Interface_Name (gnat_subprog)) && Is_Descendent_Of_Address (Etype (gnat_param))) - gnu_param_type = ptr_void_type_node; + gnu_param_type = ptr_type_node; /* Arrays are passed as pointers to element type for foreign conventions. */ if (foreign && mech != By_Copy && TREE_CODE (gnu_param_type) == ARRAY_TYPE) @@ -8310,7 +8310,7 @@ intrin_return_compatible_p (intrin_binding_t * inb) /* If return type is Address (integer type), map it to void *. */ if (Is_Descendent_Of_Address (Etype (inb->gnat_entity))) - ada_return_type = ptr_void_type_node; + ada_return_type = ptr_type_node; /* Check return types compatibility otherwise. Note that this handles void/void as well. */ diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index 35833ba..f817fbc 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -373,9 +373,6 @@ enum standard_datatypes /* The type of an exception. */ ADT_except_type, - /* Type declaration node <==> typedef void *T */ - ADT_ptr_void_type, - /* Function type declaration -- void T() */ ADT_void_ftype, @@ -461,7 +458,6 @@ extern GTY(()) tree gnat_raise_decls_ext[(int) LAST_REASON_CODE + 1]; #define longest_float_type_node gnat_std_decls[(int) ADT_longest_float_type] #define except_type_node gnat_std_decls[(int) ADT_except_type] -#define ptr_void_type_node gnat_std_decls[(int) ADT_ptr_void_type] #define void_ftype gnat_std_decls[(int) ADT_void_ftype] #define ptr_void_ftype gnat_std_decls[(int) ADT_ptr_void_ftype] #define fdesc_type_node gnat_std_decls[(int) ADT_fdesc_type] @@ -1035,18 +1031,15 @@ extern Pos get_target_short_size (void); extern Pos get_target_int_size (void); extern Pos get_target_long_size (void); extern Pos get_target_long_long_size (void); -extern Pos get_target_float_size (void); -extern Pos get_target_double_size (void); -extern Pos get_target_long_double_size (void); extern Pos get_target_pointer_size (void); extern Pos get_target_maximum_default_alignment (void); extern Pos get_target_system_allocator_alignment (void); extern Pos get_target_maximum_allowed_alignment (void); extern Pos get_target_maximum_alignment (void); -extern Nat get_float_words_be (void); -extern Nat get_words_be (void); -extern Nat get_bytes_be (void); -extern Nat get_bits_be (void); +extern Nat get_target_float_words_be (void); +extern Nat get_target_words_be (void); +extern Nat get_target_bytes_be (void); +extern Nat get_target_bits_be (void); extern Nat get_target_strict_alignment (void); extern Nat get_target_double_float_alignment (void); extern Nat get_target_double_scalar_alignment (void); diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 24fcdde..cdd5466 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -370,8 +370,6 @@ gnat_init (void) sbitsize_one_node = sbitsize_int (1); sbitsize_unit_node = sbitsize_int (BITS_PER_UNIT); - ptr_void_type_node = build_pointer_type (void_type_node); - /* Show that REFERENCE_TYPEs are internal and should be Pmode. */ internal_reference_types (); diff --git a/gcc/ada/gcc-interface/targtyps.c b/gcc/ada/gcc-interface/targtyps.c index 064b52f..b9a6e20 100644 --- a/gcc/ada/gcc-interface/targtyps.c +++ b/gcc/ada/gcc-interface/targtyps.c @@ -23,7 +23,7 @@ * * ****************************************************************************/ -/* Functions for retrieving target types. See Ada package Get_Targ */ +/* Functions for retrieving target types. See Ada package Get_Targ. */ #include "config.h" #include "system.h" @@ -192,25 +192,25 @@ get_target_maximum_alignment (void) #endif Nat -get_float_words_be (void) +get_target_float_words_be (void) { return FLOAT_WORDS_BIG_ENDIAN; } Nat -get_words_be (void) +get_target_words_be (void) { return WORDS_BIG_ENDIAN; } Nat -get_bytes_be (void) +get_target_bytes_be (void) { return BYTES_BIG_ENDIAN; } Nat -get_bits_be (void) +get_target_bits_be (void) { return BITS_BIG_ENDIAN; } diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index cb8662c..2cb8304 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -414,7 +414,7 @@ gigi (Node_Id gnat_root, ptr_void_ftype = build_pointer_type (void_ftype); /* Now declare run-time functions. */ - ftype = build_function_type_list (ptr_void_type_node, sizetype, NULL_TREE); + ftype = build_function_type_list (ptr_type_node, sizetype, NULL_TREE); /* malloc is a function declaration tree for a function to allocate memory. */ @@ -428,7 +428,7 @@ gigi (Node_Id gnat_root, free_decl = create_subprog_decl (get_identifier ("__gnat_free"), NULL_TREE, build_function_type_list (void_type_node, - ptr_void_type_node, + ptr_type_node, NULL_TREE), NULL_TREE, is_disabled, true, true, true, NULL, Empty); @@ -494,8 +494,7 @@ gigi (Node_Id gnat_root, DECL_FUNCTION_CODE (update_setjmp_buf_decl) = BUILT_IN_UPDATE_SETJMP_BUF; /* Hooks to call when entering/leaving an exception handler. */ - ftype - = build_function_type_list (void_type_node, ptr_void_type_node, NULL_TREE); + ftype = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE); begin_handler_decl = create_subprog_decl (get_identifier ("__gnat_begin_handler"), NULL_TREE, @@ -576,9 +575,7 @@ gigi (Node_Id gnat_root, set_exception_parameter_decl = create_subprog_decl (get_identifier ("__gnat_set_exception_parameter"), NULL_TREE, - build_function_type_list (void_type_node, - ptr_void_type_node, - ptr_void_type_node, + build_function_type_list (void_type_node, ptr_type_node, ptr_type_node, NULL_TREE), NULL_TREE, is_disabled, true, true, true, NULL, Empty); diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 3cefe11..c20378a 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -1351,8 +1351,8 @@ maybe_pad_type (tree type, tree size, unsigned int align, } /* Now create the field with the original size. */ - field = create_field_decl (get_identifier ("F"), type, record, orig_size, - bitsize_zero_node, 0, 1); + field = create_field_decl (get_identifier ("F"), type, record, orig_size, + bitsize_zero_node, 0, 1); DECL_INTERNAL_P (field) = 1; /* Do not emit debug info until after the auxiliary record is built. */ diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index 42587d9..157a18b 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -833,7 +833,7 @@ tree build_binary_op (enum tree_code op_code, tree result_type, tree left_operand, tree right_operand) { - tree left_type = TREE_TYPE (left_operand); + tree left_type = TREE_TYPE (left_operand); tree right_type = TREE_TYPE (right_operand); tree left_base_type = get_base_type (left_type); tree right_base_type = get_base_type (right_type); @@ -2289,14 +2289,14 @@ maybe_wrap_malloc (tree data_size, tree data_type, Node_Id gnat_node) /* Then arrange to store the allocator's return value ahead and return. */ tree storage_ptr_slot_addr - = build_binary_op (POINTER_PLUS_EXPR, ptr_void_type_node, - convert (ptr_void_type_node, aligning_field_addr), + = build_binary_op (POINTER_PLUS_EXPR, ptr_type_node, + convert (ptr_type_node, aligning_field_addr), size_int (-(HOST_WIDE_INT) POINTER_SIZE / BITS_PER_UNIT)); tree storage_ptr_slot = build_unary_op (INDIRECT_REF, NULL_TREE, - convert (build_pointer_type (ptr_void_type_node), + convert (build_pointer_type (ptr_type_node), storage_ptr_slot_addr)); return @@ -2331,15 +2331,15 @@ maybe_wrap_free (tree data_ptr, tree data_type) = (void *)DATA_PTR - (void *)sizeof (void *)) */ tree data_front_ptr = build_binary_op - (POINTER_PLUS_EXPR, ptr_void_type_node, - convert (ptr_void_type_node, data_ptr), + (POINTER_PLUS_EXPR, ptr_type_node, + convert (ptr_type_node, data_ptr), size_int (-(HOST_WIDE_INT) POINTER_SIZE / BITS_PER_UNIT)); /* FREE_PTR (void *) = *(void **)DATA_FRONT_PTR */ free_ptr = build_unary_op (INDIRECT_REF, NULL_TREE, - convert (build_pointer_type (ptr_void_type_node), data_front_ptr)); + convert (build_pointer_type (ptr_type_node), data_front_ptr)); } else free_ptr = data_ptr; |