Commit c6bd4220 by Eric Botcazou Committed by Eric Botcazou

init.c (__gnat_set_globals): Add prototype.

	* init.c (__gnat_set_globals): Add prototype.
	* adaint.c (__gnat_binder_supports_auto_init): Likewise.
	(__gnat_sals_init_using_constructors): Likewise.
	* gcc-interface/utils.c (gnat_pushlevel): Likewise.
	(get_block_jmpbuf_decl): Likewise.
	(gnat_poplevel): Likewise.
	(merge_sizes): Rename local variable.
	(copy_type): Likewise.
	(build_vms_descriptor32): Likewise.
	(build_vms_descriptor): Likewise.
	(convert_vms_descriptor64): Likewise.
	(convert_vms_descriptor32): Likewise.
	(convert_to_fat_pointer): Likewise.
	(maybe_unconstrained_array): Likewise.
	(def_fn_type): Use promoted type with va_arg.
	* gcc-interface/decl.c (gnat_to_gnu_entity): Add declaration.
	(substitute_in_type): Rename local variable.
	* gcc-interface/Make-lang.in (ada-warn): Use STRICT_WARN.

From-SVN: r149007
parent 92ec3570
2009-06-27 Eric Botcazou <ebotcazou@adacore.com>
* init.c (__gnat_set_globals): Add prototype.
* adaint.c (__gnat_binder_supports_auto_init): Likewise.
(__gnat_sals_init_using_constructors): Likewise.
* gcc-interface/utils.c (gnat_pushlevel): Likewise.
(get_block_jmpbuf_decl): Likewise.
(gnat_poplevel): Likewise.
(merge_sizes): Rename local variable.
(copy_type): Likewise.
(build_vms_descriptor32): Likewise.
(build_vms_descriptor): Likewise.
(convert_vms_descriptor64): Likewise.
(convert_vms_descriptor32): Likewise.
(convert_to_fat_pointer): Likewise.
(maybe_unconstrained_array): Likewise.
(def_fn_type): Use promoted type with va_arg.
* gcc-interface/decl.c (gnat_to_gnu_entity): Add declaration.
(substitute_in_type): Rename local variable.
* gcc-interface/Make-lang.in (ada-warn): Use STRICT_WARN.
2009-06-26 Laurent GUERBY <laurent@guerby.net>
* tb-gcc.c (trace_callback): Use char* instead of void*.
......
......@@ -3510,7 +3510,7 @@ __gnat_set_close_on_exec (int fd ATTRIBUTE_UNUSED,
/* Indicates if platforms supports automatic initialization through the
constructor mechanism */
int
__gnat_binder_supports_auto_init ()
__gnat_binder_supports_auto_init (void)
{
#ifdef VMS
return 0;
......@@ -3522,7 +3522,7 @@ __gnat_binder_supports_auto_init ()
/* Indicates that Stand-Alone Libraries are automatically initialized through
the constructor mechanism */
int
__gnat_sals_init_using_constructors ()
__gnat_sals_init_using_constructors (void)
{
#if defined (__vxworks) || defined (__Lynx__) || defined (VMS)
return 0;
......
......@@ -75,12 +75,10 @@ ADA_FLAGS_TO_PASS = \
.SUFFIXES: .ada .adb .ads
# FIXME: need to add $(ADA_CFLAGS) to .c.o suffix rule
# Use loose warnings for this front end, but add some special flags
ada-warn = $(ADA_CFLAGS) $(WERROR)
# unresolved warnings in a couple of files
ada/tracebak.o-warn = -Wno-error
ada/b_gnat1.o-warn = -Wno-error
ada/b_gnatb.o-warn = -Wno-error
# Use mildly strict warnings for this front end and add special flags.
ada-warn = $(ADA_CFLAGS) $(filter-out -pedantic, $(STRICT_WARN))
# Unresolved warnings in specific files.
ada/adaint.o-warn = -Wno-error
.adb.o:
$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
......
......@@ -2898,7 +2898,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
gnat_field = Next_Stored_Discriminant (gnat_field))
if (Present (Corresponding_Discriminant (gnat_field)))
{
gnu_field = gnat_to_gnu_field_decl (gnat_field);
tree gnu_field = gnat_to_gnu_field_decl (gnat_field);
tree gnu_ref
= build3 (COMPONENT_REF, TREE_TYPE (gnu_field),
gnu_get_parent, gnu_field, NULL_TREE);
......@@ -7840,7 +7840,7 @@ compatible_signatures_p (tree ftype1, tree ftype2)
tree
substitute_in_type (tree t, tree f, tree r)
{
tree new_tree;
tree nt;
gcc_assert (CONTAINS_PLACEHOLDER_P (r));
......@@ -7861,15 +7861,15 @@ substitute_in_type (tree t, tree f, tree r)
if (low == TYPE_GCC_MIN_VALUE (t) && high == TYPE_GCC_MAX_VALUE (t))
return t;
new_tree = copy_type (t);
TYPE_GCC_MIN_VALUE (new_tree) = low;
TYPE_GCC_MAX_VALUE (new_tree) = high;
nt = copy_type (t);
TYPE_GCC_MIN_VALUE (nt) = low;
TYPE_GCC_MAX_VALUE (nt) = high;
if (TREE_CODE (t) == INTEGER_TYPE && TYPE_INDEX_TYPE (t))
SET_TYPE_INDEX_TYPE
(new_tree, substitute_in_type (TYPE_INDEX_TYPE (t), f, r));
(nt, substitute_in_type (TYPE_INDEX_TYPE (t), f, r));
return new_tree;
return nt;
}
/* Then the subtypes. */
......@@ -7882,21 +7882,21 @@ substitute_in_type (tree t, tree f, tree r)
if (low == TYPE_RM_MIN_VALUE (t) && high == TYPE_RM_MAX_VALUE (t))
return t;
new_tree = copy_type (t);
SET_TYPE_RM_MIN_VALUE (new_tree, low);
SET_TYPE_RM_MAX_VALUE (new_tree, high);
nt = copy_type (t);
SET_TYPE_RM_MIN_VALUE (nt, low);
SET_TYPE_RM_MAX_VALUE (nt, high);
return new_tree;
return nt;
}
return t;
case COMPLEX_TYPE:
new_tree = substitute_in_type (TREE_TYPE (t), f, r);
if (new_tree == TREE_TYPE (t))
nt = substitute_in_type (TREE_TYPE (t), f, r);
if (nt == TREE_TYPE (t))
return t;
return build_complex_type (new_tree);
return build_complex_type (nt);
case OFFSET_TYPE:
case METHOD_TYPE:
......@@ -7913,16 +7913,16 @@ substitute_in_type (tree t, tree f, tree r)
if (component == TREE_TYPE (t) && domain == TYPE_DOMAIN (t))
return t;
new_tree = build_array_type (component, domain);
TYPE_ALIGN (new_tree) = TYPE_ALIGN (t);
TYPE_USER_ALIGN (new_tree) = TYPE_USER_ALIGN (t);
SET_TYPE_MODE (new_tree, TYPE_MODE (t));
TYPE_SIZE (new_tree) = SUBSTITUTE_IN_EXPR (TYPE_SIZE (t), f, r);
TYPE_SIZE_UNIT (new_tree) = SUBSTITUTE_IN_EXPR (TYPE_SIZE_UNIT (t), f, r);
TYPE_NONALIASED_COMPONENT (new_tree) = TYPE_NONALIASED_COMPONENT (t);
TYPE_MULTI_ARRAY_P (new_tree) = TYPE_MULTI_ARRAY_P (t);
TYPE_CONVENTION_FORTRAN_P (new_tree) = TYPE_CONVENTION_FORTRAN_P (t);
return new_tree;
nt = build_array_type (component, domain);
TYPE_ALIGN (nt) = TYPE_ALIGN (t);
TYPE_USER_ALIGN (nt) = TYPE_USER_ALIGN (t);
SET_TYPE_MODE (nt, TYPE_MODE (t));
TYPE_SIZE (nt) = SUBSTITUTE_IN_EXPR (TYPE_SIZE (t), f, r);
TYPE_SIZE_UNIT (nt) = SUBSTITUTE_IN_EXPR (TYPE_SIZE_UNIT (t), f, r);
TYPE_NONALIASED_COMPONENT (nt) = TYPE_NONALIASED_COMPONENT (t);
TYPE_MULTI_ARRAY_P (nt) = TYPE_MULTI_ARRAY_P (t);
TYPE_CONVENTION_FORTRAN_P (nt) = TYPE_CONVENTION_FORTRAN_P (t);
return nt;
}
case RECORD_TYPE:
......@@ -7935,8 +7935,8 @@ substitute_in_type (tree t, tree f, tree r)
/* Start out with no fields, make new fields, and chain them
in. If we haven't actually changed the type of any field,
discard everything we've done and return the old type. */
new_tree = copy_type (t);
TYPE_FIELDS (new_tree) = NULL_TREE;
nt = copy_type (t);
TYPE_FIELDS (nt) = NULL_TREE;
for (field = TYPE_FIELDS (t); field; field = TREE_CHAIN (field))
{
......@@ -7967,23 +7967,23 @@ substitute_in_type (tree t, tree f, tree r)
}
}
DECL_CONTEXT (new_field) = new_tree;
DECL_CONTEXT (new_field) = nt;
SET_DECL_ORIGINAL_FIELD (new_field,
(DECL_ORIGINAL_FIELD (field)
? DECL_ORIGINAL_FIELD (field) : field));
TREE_CHAIN (new_field) = TYPE_FIELDS (new_tree);
TYPE_FIELDS (new_tree) = new_field;
TREE_CHAIN (new_field) = TYPE_FIELDS (nt);
TYPE_FIELDS (nt) = new_field;
}
if (!changed_field)
return t;
TYPE_FIELDS (new_tree) = nreverse (TYPE_FIELDS (new_tree));
TYPE_SIZE (new_tree) = SUBSTITUTE_IN_EXPR (TYPE_SIZE (t), f, r);
TYPE_SIZE_UNIT (new_tree) = SUBSTITUTE_IN_EXPR (TYPE_SIZE_UNIT (t), f, r);
SET_TYPE_ADA_SIZE (new_tree, SUBSTITUTE_IN_EXPR (TYPE_ADA_SIZE (t), f, r));
return new_tree;
TYPE_FIELDS (nt) = nreverse (TYPE_FIELDS (nt));
TYPE_SIZE (nt) = SUBSTITUTE_IN_EXPR (TYPE_SIZE (t), f, r);
TYPE_SIZE_UNIT (nt) = SUBSTITUTE_IN_EXPR (TYPE_SIZE_UNIT (t), f, r);
SET_TYPE_ADA_SIZE (nt, SUBSTITUTE_IN_EXPR (TYPE_ADA_SIZE (t), f, r));
return nt;
}
default:
......
......@@ -178,7 +178,7 @@ __gnat_get_specific_dispatching (int priority)
file now sets the __gl_* variables directly. */
void
__gnat_set_globals ()
__gnat_set_globals (void)
{
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment