This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[ada] Convert .[ch] files to use C90 prototypes.
- From: Kelley Cook <kcook34 at ford dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 30 Oct 2003 18:09:13 -0500
- Subject: [ada] Convert .[ch] files to use C90 prototypes.
- Hop-count: 1
- Reply-to: Kelley Cook <kelleycook at wideopenwest dot com>
Long, boring. Completed bootstrap on i686-pc-cygwin with
-Wold-style-definition.
Will commit when I get home.
2003-10-30 Kelley Cook <kcook@gcc.gnu.org>
* adadecode.c, adaint.c, argv.c, aux-io.c, cal.c, cio.c, cstreams.c,
ctrl_c.c, cuintp.c, decl.c, errno.c, exit.c, expect.c, final.c,
gigi.h, gmem.c, gnatbl.c, init.c, misc.c, mkdir.c, raise.c, socket.c,
sysdep.c, sysdep.c, targtyps.c, tb-alvms.c, tb-alvxw.c, tracebak.c,
trans.c, utils.c, utils2.c: Convert function prototypes to C90.
diff -u gcc-3.4-20031029/gcc/ada/adadecode.c gcc-new/gcc/ada/adadecode.c
--- gcc-3.4-20031029/gcc/ada/adadecode.c 2003-10-24 09:02:41.000000000 -0400
+++ gcc-new/gcc/ada/adadecode.c 2003-10-30 16:10:56.000000000 -0500
@@ -41,9 +41,9 @@
#include "ctype.h"
#include "adadecode.h"
-static void add_verbose PARAMS ((const char *, char *));
-static int has_prefix PARAMS ((const char *, const char *));
-static int has_suffix PARAMS ((const char *, const char *));
+static void add_verbose (const char *, char *);
+static int has_prefix (const char *, const char *);
+static int has_suffix (const char *, const char *);
/* This is a safe version of strcpy that can be used with overlapped
pointers. Does nothing if s2 <= s1. */
@@ -55,9 +55,7 @@
/* Add TEXT to end of ADA_NAME, putting a leading " (" or ", ", depending
on VERBOSE_INFO. */
-static void add_verbose (text, ada_name)
- const char *text;
- char *ada_name;
+static void add_verbose (const char *text, char *ada_name)
{
strcat (ada_name, verbose_info ? ", " : " (");
strcat (ada_name, text);
@@ -68,9 +66,7 @@
/* Returns 1 if NAME starts with PREFIX. */
static int
-has_prefix (name, prefix)
- const char *name;
- const char *prefix;
+has_prefix (const char *name, const char *prefix)
{
return strncmp (name, prefix, strlen (prefix)) == 0;
}
@@ -78,9 +74,7 @@
/* Returns 1 if NAME ends with SUFFIX. */
static int
-has_suffix (name, suffix)
- const char *name;
- const char *suffix;
+has_suffix (const char *name, const char *suffix)
{
int nlen = strlen (name);
int slen = strlen (suffix);
@@ -147,10 +141,7 @@
x__Oexpon "**" */
void
-__gnat_decode (coded_name, ada_name, verbose)
- const char *coded_name;
- char *ada_name;
- int verbose;
+__gnat_decode (const char *coded_name, char *ada_name, int verbose)
{
int lib_subprog = 0;
int overloaded = 0;
@@ -322,8 +313,7 @@
}
char *
-ada_demangle (coded_name)
- const char *coded_name;
+ada_demangle (const char *coded_name)
{
char ada_name[2048];
diff -u gcc-3.4-20031029/gcc/ada/adaint.c gcc-new/gcc/ada/adaint.c
--- gcc-3.4-20031029/gcc/ada/adaint.c 2003-10-23 06:15:00.000000000 -0400
+++ gcc-new/gcc/ada/adaint.c 2003-10-30 17:42:19.822758400 -0500
@@ -425,7 +425,7 @@
/* Return the maximum file name length. */
int
-__gnat_get_maximum_file_name_length ()
+__gnat_get_maximum_file_name_length (void)
{
#if defined (MSDOS)
return 8;
@@ -442,7 +442,7 @@
/* Return nonzero if file names are case sensitive. */
int
-__gnat_get_file_names_case_sensitive ()
+__gnat_get_file_names_case_sensitive (void)
{
#if defined (__EMX__) || defined (MSDOS) || defined (VMS) || defined (WINNT)
return 0;
@@ -452,7 +452,7 @@
}
char
-__gnat_get_default_identifier_character_set ()
+__gnat_get_default_identifier_character_set (void)
{
#if defined (__EMX__) || defined (MSDOS)
return 'p';
@@ -782,7 +782,7 @@
/* Returns 1 if readdir is thread safe, 0 otherwise. */
int
-__gnat_readdir_is_thread_safe ()
+__gnat_readdir_is_thread_safe (void)
{
#ifdef HAVE_READDIR_R
return 1;
@@ -1270,7 +1270,7 @@
key. */
char *
-__gnat_get_libraries_from_registry ()
+__gnat_get_libraries_from_registry (void)
{
char *result = (char *) "";
@@ -2299,13 +2299,13 @@
}
char *
-__gnat_to_canonical_file_list_next ()
+__gnat_to_canonical_file_list_next (void)
{
return (char *) "";
}
void
-__gnat_to_canonical_file_list_free ()
+__gnat_to_canonical_file_list_free (void)
{
}
@@ -2340,7 +2340,7 @@
}
void
-__gnat_adjust_os_resource_limits ()
+__gnat_adjust_os_resource_limits (void)
{
}
@@ -2458,9 +2458,8 @@
locking subprograms for libgcc_eh. */
void
-__gnatlib_install_locks (lock, unlock)
- void (*lock) (void) ATTRIBUTE_UNUSED;
- void (*unlock) (void) ATTRIBUTE_UNUSED;
+__gnatlib_install_locks (void (*lock) (void) ATTRIBUTE_UNUSED,
+ void (*unlock) (void) ATTRIBUTE_UNUSED)
{
#ifdef IN_RTS
__gnat_install_locks (lock, unlock);
diff -u gcc-3.4-20031029/gcc/ada/argv.c gcc-new/gcc/ada/argv.c
--- gcc-3.4-20031029/gcc/ada/argv.c 2003-04-24 13:53:58.000000000 -0400
+++ gcc-new/gcc/ada/argv.c 2003-10-30 17:42:19.842787200 -0500
@@ -71,28 +71,25 @@
#endif
int
-__gnat_arg_count ()
+__gnat_arg_count (void)
{
return gnat_argc;
}
int
-__gnat_len_arg (arg_num)
- int arg_num;
+__gnat_len_arg (int arg_num)
{
return strlen (gnat_argv[arg_num]);
}
void
-__gnat_fill_arg (a, i)
- char *a;
- int i;
+__gnat_fill_arg ( char *a, int i)
{
strncpy (a, gnat_argv[i], strlen(gnat_argv[i]));
}
int
-__gnat_env_count ()
+__gnat_env_count (void)
{
int i;
@@ -102,16 +99,13 @@
}
int
-__gnat_len_env (env_num)
- int env_num;
+__gnat_len_env (int env_num)
{
return strlen (gnat_envp[env_num]);
}
void
-__gnat_fill_env (a, i)
- char *a;
- int i;
+__gnat_fill_env (char *a, int i)
{
strncpy (a, gnat_envp[i], strlen (gnat_envp[i]));
}
diff -u gcc-3.4-20031029/gcc/ada/aux-io.c gcc-new/gcc/ada/aux-io.c
--- gcc-3.4-20031029/gcc/ada/aux-io.c 2003-04-24 13:53:58.000000000 -0400
+++ gcc-new/gcc/ada/aux-io.c 2003-10-30 16:13:25.000000000 -0500
@@ -43,28 +43,28 @@
/* Function wrappers are needed to access the values from Ada which are
defined as C macros. */
-FILE *c_stdin PARAMS ((void));
-FILE *c_stdout PARAMS ((void));
-FILE *c_stderr PARAMS ((void));
-int seek_set_function PARAMS ((void));
-int seek_end_function PARAMS ((void));
-void *null_function PARAMS ((void));
-int c_fileno PARAMS ((FILE *));
+FILE *c_stdin (void);
+FILE *c_stdout (void);
+FILE *c_stderr (void);
+int seek_set_function (void);
+int seek_end_function (void);
+void *null_function (void);
+int c_fileno (FILE *);
FILE *
-c_stdin ()
+c_stdin (void)
{
return stdin;
}
FILE *
-c_stdout ()
+c_stdout (void)
{
return stdout;
}
FILE *
-c_stderr ()
+c_stderr (void)
{
return stderr;
}
@@ -76,25 +76,24 @@
#endif
int
-seek_set_function ()
+seek_set_function (void)
{
return SEEK_SET;
}
int
-seek_end_function ()
+seek_end_function (void)
{
return SEEK_END;
}
-void *null_function ()
+void *null_function (void)
{
return NULL;
}
int
-c_fileno (s)
- FILE *s;
+c_fileno (FILE *s)
{
return fileno (s);
}
diff -u gcc-3.4-20031029/gcc/ada/cal.c gcc-new/gcc/ada/cal.c
--- gcc-3.4-20031029/gcc/ada/cal.c 2003-04-24 13:53:58.000000000 -0400
+++ gcc-new/gcc/ada/cal.c 2003-10-30 16:28:03.000000000 -0500
@@ -94,7 +94,7 @@
what time_t is on the target. */
long
-gnat_time ()
+gnat_time (void)
{
return time (0);
}
diff -u gcc-3.4-20031029/gcc/ada/cio.c gcc-new/gcc/ada/cio.c
--- gcc-3.4-20031029/gcc/ada/cio.c 2003-10-21 09:41:58.000000000 -0400
+++ gcc-new/gcc/ada/cio.c 2003-10-30 14:37:18.000000000 -0500
@@ -52,7 +52,7 @@
#endif
int
-get_char ()
+get_char (void)
{
#ifdef VMS
return decc$getchar();
@@ -62,7 +62,7 @@
}
int
-get_int ()
+get_int (void)
{
int x;
@@ -71,8 +71,7 @@
}
void
-put_int (x)
- int x;
+put_int (int x)
{
/* Use fprintf rather than printf, since the latter is unbuffered
on vxworks */
@@ -80,22 +79,19 @@
}
void
-put_int_stderr (x)
- int x;
+put_int_stderr (int x)
{
fprintf (stderr, "%d", x);
}
void
-put_char (c)
- int c;
+put_char (int c)
{
putchar (c);
}
void
-put_char_stderr (c)
- int c;
+put_char_stderr (int c)
{
fputc (c, stderr);
}
@@ -103,8 +99,7 @@
#ifdef __vxworks
char *
-mktemp (template)
- char *template;
+mktemp (char *template)
{
return tmpnam (NULL);
}
diff -u gcc-3.4-20031029/gcc/ada/cstreams.c gcc-new/gcc/ada/cstreams.c
--- gcc-3.4-20031029/gcc/ada/cstreams.c 2003-10-22 11:13:11.000000000 -0400
+++ gcc-new/gcc/ada/cstreams.c 2003-10-30 14:35:19.000000000 -0500
@@ -76,29 +76,25 @@
#endif
int
-__gnat_feof (stream)
- FILE *stream;
+__gnat_feof (FILE *stream)
{
return (feof (stream));
}
int
-__gnat_ferror (stream)
- FILE *stream;
+__gnat_ferror (FILE *stream)
{
return (ferror (stream));
}
int
-__gnat_fileno (stream)
- FILE *stream;
+__gnat_fileno (FILE *stream)
{
return (fileno (stream));
}
int
-__gnat_is_regular_file_fd (fd)
- int fd;
+__gnat_is_regular_file_fd (int fd)
{
int ret;
struct stat statbuf;
diff -u gcc-3.4-20031029/gcc/ada/ctrl_c.c gcc-new/gcc/ada/ctrl_c.c
--- gcc-3.4-20031029/gcc/ada/ctrl_c.c 2003-10-22 17:34:51.000000000 -0400
+++ gcc-new/gcc/ada/ctrl_c.c 2003-10-30 16:36:17.000000000 -0500
@@ -132,7 +132,7 @@
}
void
-__gnat_uninstall_int_handler ()
+__gnat_uninstall_int_handler (void)
{
if (sigint_intercepted != NULL)
SetConsoleCtrlHandler (__gnat_int_handler, FALSE);
@@ -150,7 +150,7 @@
}
void
-__gnat_uninstall_int_handler ()
+__gnat_uninstall_int_handler (void)
{
}
#endif
diff -u gcc-3.4-20031029/gcc/ada/cuintp.c gcc-new/gcc/ada/cuintp.c
--- gcc-3.4-20031029/gcc/ada/cuintp.c 2003-04-24 13:53:59.000000000 -0400
+++ gcc-new/gcc/ada/cuintp.c 2003-10-30 15:06:33.000000000 -0500
@@ -57,9 +57,7 @@
resulting node. */
tree
-UI_To_gnu (Input, type)
- Uint Input;
- tree type;
+UI_To_gnu (Uint Input, tree type)
{
tree gnu_ret;
diff -u gcc-3.4-20031029/gcc/ada/decl.c gcc-new/gcc/ada/decl.c
--- gcc-3.4-20031029/gcc/ada/decl.c 2003-10-29 05:26:13.000000000 -0500
+++ gcc-new/gcc/ada/decl.c 2003-10-30 15:23:06.000000000 -0500
@@ -82,42 +82,34 @@
Entity_Id full_type;
} *defer_incomplete_list = 0;
-static tree substitution_list PARAMS ((Entity_Id, Entity_Id,
- tree, int));
-static int allocatable_size_p PARAMS ((tree, int));
-static struct attrib *build_attr_list PARAMS ((Entity_Id));
-static tree elaborate_expression PARAMS ((Node_Id, Entity_Id, tree,
- int, int, int));
-static int is_variable_size PARAMS ((tree));
-static tree elaborate_expression_1 PARAMS ((Node_Id, Entity_Id, tree,
- tree, int, int));
-static tree make_packable_type PARAMS ((tree));
-static tree maybe_pad_type PARAMS ((tree, tree, unsigned int,
- Entity_Id, const char *, int,
- int, int));
-static tree gnat_to_gnu_field PARAMS ((Entity_Id, tree, int, int));
-static void components_to_record PARAMS ((tree, Node_Id, tree, int,
- int, tree *, int, int));
-static int compare_field_bitpos PARAMS ((const PTR, const PTR));
-static Uint annotate_value PARAMS ((tree));
-static void annotate_rep PARAMS ((Entity_Id, tree));
-static tree compute_field_positions PARAMS ((tree, tree, tree, tree,
- unsigned int));
-static tree validate_size PARAMS ((Uint, tree, Entity_Id,
- enum tree_code, int, int));
-static void set_rm_size PARAMS ((Uint, tree, Entity_Id));
-static tree make_type_from_size PARAMS ((tree, tree, int));
-static unsigned int validate_alignment PARAMS ((Uint, Entity_Id,
- unsigned int));
-static void check_ok_for_atomic PARAMS ((tree, Entity_Id, int));
+static tree substitution_list (Entity_Id, Entity_Id, tree, int);
+static int allocatable_size_p (tree, int);
+static struct attrib *build_attr_list (Entity_Id);
+static tree elaborate_expression (Node_Id, Entity_Id, tree, int, int, int);
+static int is_variable_size (tree);
+static tree elaborate_expression_1 (Node_Id, Entity_Id, tree, tree, int, int);
+static tree make_packable_type (tree);
+static tree maybe_pad_type (tree, tree, unsigned int, Entity_Id, const char *,
+ int, int, int);
+static tree gnat_to_gnu_field (Entity_Id, tree, int, int);
+static void components_to_record (tree, Node_Id, tree, int, int, tree *,
+ int, int);
+static int compare_field_bitpos (const PTR, const PTR);
+static Uint annotate_value (tree);
+static void annotate_rep (Entity_Id, tree);
+static tree compute_field_positions (tree, tree, tree, tree, unsigned int);
+static tree validate_size (Uint, tree, Entity_Id, enum tree_code, int, int);
+static void set_rm_size (Uint, tree, Entity_Id);
+static tree make_type_from_size (tree, tree, int);
+static unsigned int validate_alignment (Uint, Entity_Id, unsigned int);
+static void check_ok_for_atomic (tree, Entity_Id, int);
/* Given GNAT_ENTITY, an entity in the incoming GNAT tree, return a
GCC type corresponding to that entity. GNAT_ENTITY is assumed to
refer to an Ada type. */
tree
-gnat_to_gnu_type (gnat_entity)
- Entity_Id gnat_entity;
+gnat_to_gnu_type (Entity_Id gnat_entity)
{
tree gnu_decl;
@@ -146,10 +138,7 @@
the code. */
tree
-gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
- Entity_Id gnat_entity;
- tree gnu_expr;
- int definition;
+gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
{
tree gnu_entity_id;
tree gnu_type = 0;
@@ -4037,8 +4026,7 @@
be elaborated at the point of its definition, but do nothing else. */
void
-elaborate_entity (gnat_entity)
- Entity_Id gnat_entity;
+elaborate_entity (Entity_Id gnat_entity)
{
switch (Ekind (gnat_entity))
{
@@ -4109,8 +4097,7 @@
any entities on its entity chain similarly. */
void
-mark_out_of_scope (gnat_entity)
- Entity_Id gnat_entity;
+mark_out_of_scope (Entity_Id gnat_entity)
{
Entity_Id gnat_sub_entity;
unsigned int kind = Ekind (gnat_entity);
@@ -4153,11 +4140,10 @@
DEFINITION is as in gnat_to_gnu_entity. */
static tree
-substitution_list (gnat_subtype, gnat_type, gnu_list, definition)
- Entity_Id gnat_subtype;
- Entity_Id gnat_type;
- tree gnu_list;
- int definition;
+substitution_list (Entity_Id gnat_subtype,
+ Entity_Id gnat_type,
+ tree gnu_list,
+ int definition)
{
Entity_Id gnat_discrim;
Node_Id gnat_value;
@@ -4191,7 +4177,7 @@
/* Initialize the above table. */
void
-init_dummy_type ()
+init_dummy_type (void)
{
Node_Id gnat_node;
@@ -4206,8 +4192,7 @@
/* Make a dummy type corresponding to GNAT_TYPE. */
tree
-make_dummy_type (gnat_type)
- Entity_Id gnat_type;
+make_dummy_type (Entity_Id gnat_type)
{
Entity_Id gnat_underlying;
tree gnu_type;
@@ -4253,9 +4238,7 @@
done with a static allocation. */
static int
-allocatable_size_p (gnu_size, static_p)
- tree gnu_size;
- int static_p;
+allocatable_size_p (tree gnu_size, int static_p)
{
HOST_WIDE_INT our_size;
@@ -4279,8 +4262,7 @@
/* Return a list of attributes for GNAT_ENTITY, if any. */
static struct attrib *
-build_attr_list (gnat_entity)
- Entity_Id gnat_entity;
+build_attr_list (Entity_Id gnat_entity)
{
struct attrib *attr_list = 0;
Node_Id gnat_temp;
@@ -4352,8 +4334,7 @@
/* Get the unpadded version of a GNAT type. */
tree
-get_unpadded_type (gnat_entity)
- Entity_Id gnat_entity;
+get_unpadded_type (Entity_Id gnat_entity)
{
tree type = gnat_to_gnu_type (gnat_entity);
@@ -4366,9 +4347,7 @@
/* Called when we need to protect a variable object using a save_expr. */
tree
-maybe_variable (gnu_operand, gnat_node)
- tree gnu_operand;
- Node_Id gnat_node;
+maybe_variable (tree gnu_operand, Node_Id gnat_node)
{
if (TREE_CONSTANT (gnu_operand) || TREE_READONLY (gnu_operand)
|| TREE_CODE (gnu_operand) == SAVE_EXPR
@@ -4397,14 +4376,12 @@
purposes even if it isn't needed for code generation. */
static tree
-elaborate_expression (gnat_expr, gnat_entity, gnu_name, definition,
- need_value, need_debug)
- Node_Id gnat_expr;
- Entity_Id gnat_entity;
- tree gnu_name;
- int definition;
- int need_value;
- int need_debug;
+elaborate_expression (Node_Id gnat_expr,
+ Entity_Id gnat_entity,
+ tree gnu_name,
+ int definition,
+ int need_value,
+ int need_debug)
{
tree gnu_expr;
@@ -4439,14 +4416,12 @@
/* Similar, but take a GNU expression. */
static tree
-elaborate_expression_1 (gnat_expr, gnat_entity, gnu_expr, gnu_name, definition,
- need_debug)
- Node_Id gnat_expr;
- Entity_Id gnat_entity;
- tree gnu_expr;
- tree gnu_name;
- int definition;
- int need_debug;
+elaborate_expression_1 (Node_Id gnat_expr,
+ Entity_Id gnat_entity,
+ tree gnu_expr,
+ tree gnu_name,
+ int definition,
+ int need_debug)
{
tree gnu_decl = 0;
/* Strip any conversions to see if the expression is a readonly variable.
@@ -4514,10 +4489,7 @@
position so that it is aligned to ALIGN bits and is SIZE bytes long. */
tree
-make_aligning_type (type, align, size)
- tree type;
- int align;
- tree size;
+make_aligning_type (tree type, int align, tree size)
{
tree record_type = make_node (RECORD_TYPE);
tree place = build (PLACEHOLDER_EXPR, record_type);
@@ -4568,8 +4540,7 @@
return the new type. If not, return the original type. */
static tree
-make_packable_type (type)
- tree type;
+make_packable_type (tree type)
{
tree new_type = make_node (TREE_CODE (type));
tree field_list = NULL_TREE;
@@ -4645,16 +4616,14 @@
type. */
static tree
-maybe_pad_type (type, size, align, gnat_entity, name_trailer,
- is_user_type, definition, same_rm_size)
- tree type;
- tree size;
- unsigned int align;
- Entity_Id gnat_entity;
- const char *name_trailer;
- int is_user_type;
- int definition;
- int same_rm_size;
+maybe_pad_type (tree type,
+ tree size,
+ unsigned int align,
+ Entity_Id gnat_entity,
+ const char *name_trailer,
+ int is_user_type,
+ int definition,
+ int same_rm_size)
{
tree orig_size = TYPE_SIZE (type);
tree record;
@@ -4830,9 +4799,7 @@
the value passed against the list of choices. */
tree
-choices_to_gnu (operand, choices)
- tree operand;
- Node_Id choices;
+choices_to_gnu (tree operand, Node_Id choices)
{
Node_Id choice;
Node_Id gnat_temp;
@@ -4924,11 +4891,10 @@
DEFINITION is nonzero if this field is for a record being defined. */
static tree
-gnat_to_gnu_field (gnat_field, gnu_record_type, packed, definition)
- Entity_Id gnat_field;
- tree gnu_record_type;
- int packed;
- int definition;
+gnat_to_gnu_field (Entity_Id gnat_field,
+ tree gnu_record_type,
+ int packed,
+ int definition)
{
tree gnu_field_id = get_entity_name (gnat_field);
tree gnu_field_type = gnat_to_gnu_type (Etype (gnat_field));
@@ -5173,8 +5139,7 @@
of variable size or is a record that has a field such a field. */
static int
-is_variable_size (type)
- tree type;
+is_variable_size (tree type)
{
tree field;
@@ -5229,16 +5194,14 @@
fields of the record and then the record type is finished. */
static void
-components_to_record (gnu_record_type, component_list, gnu_field_list, packed,
- definition, p_gnu_rep_list, cancel_alignment, all_rep)
- tree gnu_record_type;
- Node_Id component_list;
- tree gnu_field_list;
- int packed;
- int definition;
- tree *p_gnu_rep_list;
- int cancel_alignment;
- int all_rep;
+components_to_record (tree gnu_record_type,
+ Node_Id component_list,
+ tree gnu_field_list,
+ int packed,
+ int definition,
+ tree *p_gnu_rep_list,
+ int cancel_alignment,
+ int all_rep)
{
Node_Id component_decl;
Entity_Id gnat_field;
@@ -5502,9 +5465,7 @@
bit positions and ordinals of the two fields. */
static int
-compare_field_bitpos (rt1, rt2)
- const PTR rt1;
- const PTR rt2;
+compare_field_bitpos (const PTR rt1, const PTR rt2)
{
tree *t1 = (tree *) rt1;
tree *t2 = (tree *) rt2;
@@ -5524,8 +5485,7 @@
in the GNAT tree. */
static Uint
-annotate_value (gnu_size)
- tree gnu_size;
+annotate_value (tree gnu_size)
{
int len = TREE_CODE_LENGTH (TREE_CODE (gnu_size));
TCode tcode;
@@ -5663,9 +5623,7 @@
used by Gigi. */
static void
-annotate_rep (gnat_entity, gnu_type)
- Entity_Id gnat_entity;
- tree gnu_type;
+annotate_rep (Entity_Id gnat_entity, tree gnu_type)
{
tree gnu_list;
tree gnu_entry;
@@ -5743,12 +5701,11 @@
so far. */
static tree
-compute_field_positions (gnu_type, gnu_list, gnu_pos, gnu_bitpos, offset_align)
- tree gnu_type;
- tree gnu_list;
- tree gnu_pos;
- tree gnu_bitpos;
- unsigned int offset_align;
+compute_field_positions (tree gnu_type,
+ tree gnu_list,
+ tree gnu_pos,
+ tree gnu_bitpos,
+ unsigned int offset_align)
{
tree gnu_field;
tree gnu_result = gnu_list;
@@ -5792,13 +5749,12 @@
it means that a size of zero should be treated as an unspecified size. */
static tree
-validate_size (uint_size, gnu_type, gnat_object, kind, component_p, zero_ok)
- Uint uint_size;
- tree gnu_type;
- Entity_Id gnat_object;
- enum tree_code kind;
- int component_p;
- int zero_ok;
+validate_size (Uint uint_size,
+ tree gnu_type,
+ Entity_Id gnat_object,
+ enum tree_code kind,
+ int component_p,
+ int zero_ok)
{
Node_Id gnat_error_node;
tree type_size
@@ -5911,10 +5867,7 @@
routine is only called for types. */
static void
-set_rm_size (uint_size, gnu_type, gnat_entity)
- Uint uint_size;
- tree gnu_type;
- Entity_Id gnat_entity;
+set_rm_size (Uint uint_size, tree gnu_type, Entity_Id gnat_entity)
{
/* Only give an error if a Value_Size clause was explicitly given.
Otherwise, we'd be duplicating an error on the Size clause. */
@@ -5988,10 +5941,7 @@
we are making a biased type. */
static tree
-make_type_from_size (type, size_tree, biased_p)
- tree type;
- tree size_tree;
- int biased_p;
+make_type_from_size (tree type, tree size_tree, int biased_p)
{
tree new_type;
unsigned HOST_WIDE_INT size;
@@ -6061,10 +6011,7 @@
valid, return it. Otherwise, give an error and return ALIGN. */
static unsigned int
-validate_alignment (alignment, gnat_entity, align)
- Uint alignment;
- Entity_Id gnat_entity;
- unsigned int align;
+validate_alignment (Uint alignment, Entity_Id gnat_entity, unsigned int align)
{
Node_Id gnat_error_node = gnat_entity;
unsigned int new_align;
@@ -6109,10 +6056,7 @@
if we require atomic components. */
static void
-check_ok_for_atomic (object, gnat_entity, comp_p)
- tree object;
- Entity_Id gnat_entity;
- int comp_p;
+check_ok_for_atomic (tree object, Entity_Id gnat_entity, int comp_p)
{
Node_Id gnat_error_point = gnat_entity;
Node_Id gnat_node;
@@ -6188,8 +6132,7 @@
changed. */
tree
-gnat_substitute_in_type (t, f, r)
- tree t, f, r;
+gnat_substitute_in_type (tree t, tree f, tree r)
{
tree new = t;
tree tem;
@@ -6410,8 +6353,7 @@
needed to represent the object. */
tree
-rm_size (gnu_type)
- tree gnu_type;
+rm_size (tree gnu_type)
{
/* For integer types, this is the precision. For record types, we store
the size explicitly. For other types, this is just the size. */
@@ -6440,9 +6382,7 @@
and the specified suffix. */
tree
-create_concat_name (gnat_entity, suffix)
- Entity_Id gnat_entity;
- const char *suffix;
+create_concat_name (Entity_Id gnat_entity, const char *suffix)
{
const char *str = (suffix == 0 ? "" : suffix);
String_Template temp = {1, strlen (str)};
@@ -6480,8 +6420,7 @@
Otherwise, return the name. */
tree
-get_entity_name (gnat_entity)
- Entity_Id gnat_entity;
+get_entity_name (Entity_Id gnat_entity)
{
Get_Encoded_Name (gnat_entity);
return get_identifier (Name_Buffer);
@@ -6492,9 +6431,7 @@
the name in GNU_ID and SUFFIX. */
tree
-concat_id_with_name (gnu_id, suffix)
- tree gnu_id;
- const char *suffix;
+concat_id_with_name (tree gnu_id, const char *suffix)
{
int len = IDENTIFIER_LENGTH (gnu_id);
diff -u gcc-3.4-20031029/gcc/ada/errno.c gcc-new/gcc/ada/errno.c
--- gcc-3.4-20031029/gcc/ada/errno.c 2003-04-24 13:53:59.000000000 -0400
+++ gcc-new/gcc/ada/errno.c 2003-10-30 16:28:54.000000000 -0500
@@ -42,14 +42,13 @@
#include <errno.h>
int
-__get_errno()
+__get_errno(void)
{
return errno;
}
void
-__set_errno(err)
- int err;
+__set_errno(int err)
{
errno = err;
}
diff -u gcc-3.4-20031029/gcc/ada/exit.c gcc-new/gcc/ada/exit.c
--- gcc-3.4-20031029/gcc/ada/exit.c 2003-04-24 13:53:59.000000000 -0400
+++ gcc-new/gcc/ada/exit.c 2003-10-30 14:35:40.000000000 -0500
@@ -50,8 +50,7 @@
int gnat_exit_status = 0;
void
-__gnat_set_exit_status (i)
- int i;
+__gnat_set_exit_status (int i)
{
gnat_exit_status = i;
}
diff -u gcc-3.4-20031029/gcc/ada/expect.c gcc-new/gcc/ada/expect.c
--- gcc-3.4-20031029/gcc/ada/expect.c 2003-10-21 09:41:59.000000000 -0400
+++ gcc-new/gcc/ada/expect.c 2003-10-30 16:29:58.000000000 -0500
@@ -72,7 +72,7 @@
}
int
-__gnat_expect_fork ()
+__gnat_expect_fork (void)
{
return 0;
}
@@ -159,7 +159,7 @@
}
int
-__gnat_expect_fork ()
+__gnat_expect_fork (void)
{
return -1;
}
@@ -299,7 +299,7 @@
}
int
-__gnat_expect_fork ()
+__gnat_expect_fork (void)
{
return fork ();
}
@@ -406,7 +406,7 @@
}
int
-__gnat_expect_fork ()
+__gnat_expect_fork (void)
{
return -1;
}
diff -u gcc-3.4-20031029/gcc/ada/final.c gcc-new/gcc/ada/final.c
--- gcc-3.4-20031029/gcc/ada/final.c 2003-10-21 09:41:59.000000000 -0400
+++ gcc-new/gcc/ada/final.c 2003-10-30 14:35:53.000000000 -0500
@@ -38,6 +38,6 @@
where finalization is required. */
void
-__gnat_finalize ()
+__gnat_finalize (void)
{
}
diff -u gcc-3.4-20031029/gcc/ada/gigi.h gcc-new/gcc/ada/gigi.h
--- gcc-3.4-20031029/gcc/ada/gigi.h 2003-10-29 05:26:14.000000000 -0500
+++ gcc-new/gcc/ada/gigi.h 2003-10-30 16:52:23.000000000 -0500
@@ -39,42 +39,42 @@
/* See if DECL has an RTL that is indirect via a pseudo-register or a
memory location and replace it with an indirect reference if so.
This improves the debugger's ability to display the value. */
-extern void adjust_decl_rtl PARAMS ((tree));
+extern void adjust_decl_rtl (tree);
/* Record the current code position in GNAT_NODE. */
-extern void record_code_position PARAMS ((Node_Id));
+extern void record_code_position (Node_Id);
/* Insert the code for GNAT_NODE at the position saved for that node. */
-extern void insert_code_for PARAMS ((Node_Id));
+extern void insert_code_for (Node_Id);
/* Compute the alignment of the largest mode that can be used for copying
objects. */
-extern void gnat_compute_largest_alignment PARAMS ((void));
+extern void gnat_compute_largest_alignment (void);
/* Routine called by gcc for emitting a stack check. GNU_EXPR is the
expression that contains the last address on the stack to check. */
-extern tree emit_stack_check PARAMS ((tree));
+extern tree emit_stack_check (tree);
/* Make a TRANSFORM_EXPR to later expand GNAT_NODE into code. */
-extern tree make_transform_expr PARAMS ((Node_Id));
+extern tree make_transform_expr (Node_Id);
/* Update the setjmp buffer BUF with the current stack pointer. We assume
here that a __builtin_setjmp was done to BUF. */
-extern void update_setjmp_buf PARAMS ((tree));
+extern void update_setjmp_buf (tree);
/* GNU_TYPE is a type. Determine if it should be passed by reference by
default. */
-extern int default_pass_by_ref PARAMS ((tree));
+extern int default_pass_by_ref (tree);
/* GNU_TYPE is the type of a subprogram parameter. Determine from the type
if it should be passed by reference. */
-extern int must_pass_by_ref PARAMS ((tree));
+extern int must_pass_by_ref (tree);
/* Elaboration routines for the front end. */
-extern void elab_all_gnat PARAMS ((void));
+extern void elab_all_gnat (void);
/* Initialize DUMMY_NODE_TABLE. */
-extern void init_dummy_type PARAMS ((void));
+extern void init_dummy_type (void);
/* Given GNAT_ENTITY, a GNAT defining identifier node, which denotes some Ada
entity, this routine returns the equivalent GCC tree for that entity
@@ -91,63 +91,63 @@
was not created previously. The value of 1 is normally used for a non-zero
DEFINITION, but a value of 2 is used in special circumstances, defined in
the code. */
-extern tree gnat_to_gnu_entity PARAMS ((Entity_Id, tree, int));
+extern tree gnat_to_gnu_entity (Entity_Id, tree, int);
/* Given GNAT_ENTITY, an entity in the incoming GNAT tree, return a
GCC type corresponding to that entity. GNAT_ENTITY is assumed to
refer to an Ada type. */
-extern tree gnat_to_gnu_type PARAMS ((Entity_Id));
+extern tree gnat_to_gnu_type (Entity_Id);
/* Given GNAT_ENTITY, elaborate all expressions that are required to
be elaborated at the point of its definition, but do nothing else. */
-extern void elaborate_entity PARAMS ((Entity_Id));
+extern void elaborate_entity (Entity_Id);
/* Mark GNAT_ENTITY as going out of scope at this point. Recursively mark
any entities on its entity chain similarly. */
-extern void mark_out_of_scope PARAMS ((Entity_Id));
+extern void mark_out_of_scope (Entity_Id);
/* Make a dummy type corresponding to GNAT_TYPE. */
-extern tree make_dummy_type PARAMS ((Entity_Id));
+extern tree make_dummy_type (Entity_Id);
/* Get the unpadded version of a GNAT type. */
-extern tree get_unpadded_type PARAMS ((Entity_Id));
+extern tree get_unpadded_type (Entity_Id);
/* Called when we need to protect a variable object using a save_expr. */
-extern tree maybe_variable PARAMS ((tree, Node_Id));
+extern tree maybe_variable (tree, Node_Id);
/* Create a record type that contains a field of TYPE with a starting bit
position so that it is aligned to ALIGN bits. */
/* Create a record type that contains a field of TYPE with a starting bit
position so that it is aligned to ALIGN bits and is SIZE bytes long. */
-extern tree make_aligning_type PARAMS ((tree, int, tree));
+extern tree make_aligning_type (tree, int, tree);
/* Given a GNU tree and a GNAT list of choices, generate an expression to test
the value passed against the list of choices. */
-extern tree choices_to_gnu PARAMS ((tree, Node_Id));
+extern tree choices_to_gnu (tree, Node_Id);
/* Given a type T, a FIELD_DECL F, and a replacement value R,
return a new type with all size expressions that contain F
updated by replacing F with R. This is identical to GCC's
substitute_in_type except that it knows about TYPE_INDEX_TYPE. */
-extern tree gnat_substitute_in_type PARAMS ((tree, tree, tree));
+extern tree gnat_substitute_in_type (tree, tree, tree);
/* Return the "RM size" of GNU_TYPE. This is the actual number of bits
needed to represent the object. */
-extern tree rm_size PARAMS ((tree));
+extern tree rm_size (tree);
/* Given GNU_ID, an IDENTIFIER_NODE containing a name and SUFFIX, a
string, return a new IDENTIFIER_NODE that is the concatenation of
the name in GNU_ID and SUFFIX. */
-extern tree concat_id_with_name PARAMS ((tree, const char *));
+extern tree concat_id_with_name (tree, const char *);
/* Return the name to be used for GNAT_ENTITY. If a type, create a
fully-qualified name, possibly with type information encoding.
Otherwise, return the name. */
-extern tree get_entity_name PARAMS ((Entity_Id));
+extern tree get_entity_name (Entity_Id);
/* Return a name for GNAT_ENTITY concatenated with two underscores and
SUFFIX. */
-extern tree create_concat_name PARAMS ((Entity_Id, const char *));
+extern tree create_concat_name (Entity_Id, const char *);
/* Flag indicating whether file names are discarded in exception messages */
extern int discard_file_names;
@@ -168,87 +168,78 @@
/* This is the main program of the back-end. It sets up all the table
structures and then generates code. */
-extern void gigi PARAMS ((Node_Id, int, int, struct Node *,
- Node_Id *, Node_Id *,
- struct Elist_Header *,
- struct Elmt_Item *,
- struct String_Entry *,
- Char_Code *,
- struct List_Header *,
- Int, char *,
- Entity_Id, Entity_Id, Entity_Id,
- Int));
+extern void gigi (Node_Id, int, int, struct Node *, Node_Id *, Node_Id *,
+ struct Elist_Header *, struct Elmt_Item *,
+ struct String_Entry *, Char_Code *, struct List_Header *,
+ Int, char *, Entity_Id, Entity_Id, Entity_Id, Int);
/* This function is the driver of the GNAT to GCC tree transformation process.
GNAT_NODE is the root of some gnat tree. It generates code for that
part of the tree. */
-extern void gnat_to_code PARAMS ((Node_Id));
+extern void gnat_to_code (Node_Id);
/* GNAT_NODE is the root of some GNAT tree. Return the root of the
GCC tree corresponding to that GNAT tree. Normally, no code is generated;
we just return an equivalent tree which is used elsewhere to generate
code. */
-extern tree gnat_to_gnu PARAMS ((Node_Id));
+extern tree gnat_to_gnu (Node_Id);
/* GNU_STMT is a statement. We generate code for that statement. */
-extern void gnat_expand_stmt PARAMS ((tree));
+extern void gnat_expand_stmt (tree);
/* Do the processing for the declaration of a GNAT_ENTITY, a type. If
a separate Freeze node exists, delay the bulk of the processing. Otherwise
make a GCC type for GNAT_ENTITY and set up the correspondance. */
-extern void process_type PARAMS ((Entity_Id));
+extern void process_type (Entity_Id);
/* Determine the input_filename and the input_line from the source location
(Sloc) of GNAT_NODE node. Set the global variable input_filename and
input_line. If WRITE_NOTE_P is true, emit a line number note. */
-extern void set_lineno PARAMS ((Node_Id, int));
+extern void set_lineno (Node_Id, int);
/* Likewise, but passed a Sloc. */
-extern void set_lineno_from_sloc PARAMS ((Source_Ptr, int));
+extern void set_lineno_from_sloc (Source_Ptr, int);
/* Post an error message. MSG is the error message, properly annotated.
NODE is the node at which to post the error and the node to use for the
"&" substitution. */
-extern void post_error PARAMS ((const char *, Node_Id));
+extern void post_error (const char *, Node_Id);
/* Similar, but NODE is the node at which to post the error and ENT
is the node to use for the "&" substitution. */
-extern void post_error_ne PARAMS ((const char *, Node_Id, Entity_Id));
+extern void post_error_ne (const char *, Node_Id, Entity_Id);
/* Similar, but NODE is the node at which to post the error, ENT is the node
to use for the "&" substitution, and N is the number to use for the ^. */
-extern void post_error_ne_num PARAMS ((const char *, Node_Id, Entity_Id,
- int));
+extern void post_error_ne_num (const char *, Node_Id, Entity_Id, int);
/* Similar to post_error_ne_num, but T is a GCC tree representing the number
to write. If the tree represents a constant that fits within a
host integer, the text inside curly brackets in MSG will be output
(presumably including a '^'). Otherwise that text will not be output
and the text inside square brackets will be output instead. */
-extern void post_error_ne_tree PARAMS ((const char *, Node_Id, Entity_Id,
- tree));
+extern void post_error_ne_tree (const char *, Node_Id, Entity_Id, tree);
/* Similar to post_error_ne_tree, except that NUM is a second
integer to write in the message. */
-extern void post_error_ne_tree_2 PARAMS ((const char *, Node_Id, Entity_Id,
- tree, int));
+extern void post_error_ne_tree_2 (const char *, Node_Id, Entity_Id, tree, int);
/* Set the node for a second '&' in the error message. */
-extern void set_second_error_entity PARAMS ((Entity_Id));
+extern void set_second_error_entity (Entity_Id);
/* Protect EXP from multiple evaluation. This may make a SAVE_EXPR. */
-extern tree protect_multiple_eval PARAMS ((tree));
+extern tree protect_multiple_eval (tree);
/* Signal abort, with "Gigi abort" as the error label, and error_gnat_node
as the relevant node that provides the location info for the error.
The single parameter CODE is an integer code that is included in the
additional error message generated. */
-extern void gigi_abort PARAMS ((int)) ATTRIBUTE_NORETURN;
+extern void gigi_abort (int) ATTRIBUTE_NORETURN;
/* Initialize the table that maps GNAT codes to GCC codes for simple
binary and unary operations. */
-extern void init_code_table PARAMS ((void));
+extern void init_code_table (void);
/* Current node being treated, in case gigi_abort or Check_Elaboration_Code
called. */
@@ -258,7 +249,7 @@
how to handle our new nodes and we take an extra argument that says
whether to force evaluation of everything. */
-extern tree gnat_stabilize_reference PARAMS ((tree, int));
+extern tree gnat_stabilize_reference (tree, int);
/* Highest number in the front-end node table. */
extern int max_gnat_nodes;
@@ -386,18 +377,18 @@
prototype and names as below. */
/* Returns non-zero if we are currently in the global binding level */
-extern int global_bindings_p PARAMS ((void));
+extern int global_bindings_p (void);
/* Returns the list of declarations in the current level. Note that this list
is in reverse order (it has to be so for back-end compatibility). */
-extern tree getdecls PARAMS ((void));
+extern tree getdecls (void);
/* Nonzero if the current level needs to have a BLOCK made. */
-extern int kept_level_p PARAMS ((void));
+extern int kept_level_p (void);
/* Enter a new binding level. The input parameter is ignored, but has to be
specified for back-end compatibility. */
-extern void pushlevel PARAMS ((int));
+extern void pushlevel (int);
/* Exit a binding level.
Pop the level off, and restore the state of the identifier-decl mappings
@@ -413,52 +404,52 @@
If REVERSE is nonzero, reverse the order of decls before putting
them into the BLOCK. */
-extern tree poplevel PARAMS ((int,int, int));
+extern tree poplevel (int, int, int);
/* Insert BLOCK at the end of the list of subblocks of the
current binding level. This is used when a BIND_EXPR is expanded,
to handle the BLOCK node inside the BIND_EXPR. */
-extern void insert_block PARAMS ((tree));
+extern void insert_block (tree);
/* Set the BLOCK node for the innermost scope
(the one we are currently in). */
-extern void set_block PARAMS ((tree));
+extern void set_block (tree);
/* Records a ..._DECL node DECL as belonging to the current lexical scope.
Returns the ..._DECL node. */
-extern tree pushdecl PARAMS ((tree));
+extern tree pushdecl (tree);
/* Create the predefined scalar types such as `integer_type_node' needed
in the gcc back-end and initialize the global binding level. */
-extern void gnat_init_decl_processing PARAMS ((void));
-extern void init_gigi_decls PARAMS ((tree, tree));
-extern void gnat_init_gcc_eh PARAMS ((void));
+extern void gnat_init_decl_processing (void);
+extern void init_gigi_decls (tree, tree);
+extern void gnat_init_gcc_eh (void);
/* Return an integer type with the number of bits of precision given by
PRECISION. UNSIGNEDP is nonzero if the type is unsigned; otherwise
it is a signed type. */
-extern tree gnat_type_for_size PARAMS ((unsigned, int));
+extern tree gnat_type_for_size (unsigned, int);
/* Return a data type that has machine mode MODE. UNSIGNEDP selects
an unsigned type; otherwise a signed type is returned. */
-extern tree gnat_type_for_mode PARAMS ((enum machine_mode, int));
+extern tree gnat_type_for_mode (enum machine_mode, int);
/* Return the unsigned version of a TYPE_NODE, a scalar type. */
-extern tree gnat_unsigned_type PARAMS ((tree));
+extern tree gnat_unsigned_type (tree);
/* Return the signed version of a TYPE_NODE, a scalar type. */
-extern tree gnat_signed_type PARAMS ((tree));
+extern tree gnat_signed_type (tree);
/* Return a type the same as TYPE except unsigned or signed according to
UNSIGNEDP. */
-extern tree gnat_signed_or_unsigned_type PARAMS ((int, tree));
+extern tree gnat_signed_or_unsigned_type (int, tree);
/* Create an expression whose value is that of EXPR,
converted to type TYPE. The TREE_TYPE of the value
is always TYPE. This function implements all reasonable
conversions; callers should filter out those that are
not permitted by the language being compiled. */
-extern tree convert PARAMS ((tree, tree));
+extern tree convert (tree, tree);
/* Routines created solely for the tree translator's sake. Their prototypes
can be changed as desired. */
@@ -468,18 +459,18 @@
GNAT_ENTITY. Such gnu tree node is always an ..._DECL node.
If NO_CHECK is nonzero, the latter check is suppressed.
If GNU_DECL is zero, a previous association is to be reset. */
-extern void save_gnu_tree PARAMS ((Entity_Id, tree, int));
+extern void save_gnu_tree (Entity_Id, tree, int);
/* GNAT_ENTITY is a GNAT tree node for a defining identifier.
Return the ..._DECL node that was associated with it. If there is no tree
node associated with GNAT_ENTITY, abort. */
-extern tree get_gnu_tree PARAMS ((Entity_Id));
+extern tree get_gnu_tree (Entity_Id);
/* Return nonzero if a GCC tree has been associated with GNAT_ENTITY. */
-extern int present_gnu_tree PARAMS ((Entity_Id));
+extern int present_gnu_tree (Entity_Id);
/* Initialize tables for above routines. */
-extern void init_gnat_to_gnu PARAMS ((void));
+extern void init_gnat_to_gnu (void);
/* Given a record type (RECORD_TYPE) and a chain of FIELD_DECL
nodes (FIELDLIST), finish constructing the record or union type.
@@ -487,7 +478,7 @@
layout_type but merely set the size and alignment ourselves.
If DEFER_DEBUG is nonzero, do not call the debugging routines
on this type; it will be done later. */
-extern void finish_record_type PARAMS ((tree, tree, int, int));
+extern void finish_record_type (tree, tree, int, int);
/* Returns a FUNCTION_TYPE node. RETURN_TYPE is the type returned by the
subprogram. If it is void_type_node, then we are dealing with a procedure,
@@ -498,23 +489,21 @@
object. RETURNS_BY_REF is nonzero if the function returns by reference.
RETURNS_WITH_DSP is nonzero if the function is to return with a
depressed stack pointer. */
-extern tree create_subprog_type PARAMS ((tree, tree, tree, int, int,
- int));
+extern tree create_subprog_type (tree, tree, tree, int, int, int);
/* Return a copy of TYPE, but safe to modify in any way. */
-extern tree copy_type PARAMS ((tree));
+extern tree copy_type (tree);
/* Return an INTEGER_TYPE of SIZETYPE with range MIN to MAX and whose
TYPE_INDEX_TYPE is INDEX. */
-extern tree create_index_type PARAMS ((tree, tree, tree));
+extern tree create_index_type (tree, tree, tree);
/* Return a TYPE_DECL node. TYPE_NAME gives the name of the type (a character
string) and TYPE is a ..._TYPE node giving its data type.
ARTIFICIAL_P is nonzero if this is a declaration that was generated
by the compiler. DEBUG_INFO_P is nonzero if we need to write debugging
information about this type. */
-extern tree create_type_decl PARAMS ((tree, tree, struct attrib *,
- int, int));
+extern tree create_type_decl (tree, tree, struct attrib *, int, int);
/* Returns a GCC VAR_DECL node. VAR_NAME gives the name of the variable.
ASM_NAME is its assembler name (if provided). TYPE is
@@ -530,36 +519,35 @@
definition: no storage is to be allocated for the variable here).
STATIC_FLAG is only relevant when not at top level. In that case
it indicates whether to always allocate storage to the variable. */
-extern tree create_var_decl PARAMS ((tree, tree, tree, tree, int,
- int, int, int,
- struct attrib *));
+extern tree create_var_decl (tree, tree, tree, tree, int, int, int, int,
+ struct attrib *);
/* Given a DECL and ATTR_LIST, apply the listed attributes. */
-extern void process_attributes PARAMS ((tree, struct attrib *));
+extern void process_attributes (tree, struct attrib *);
/* Obtain any pending elaborations and clear the old list. */
-extern tree get_pending_elaborations PARAMS ((void));
+extern tree get_pending_elaborations (void);
/* Return nonzero if there are pending elaborations. */
-extern int pending_elaborations_p PARAMS ((void));
+extern int pending_elaborations_p (void);
/* Save a copy of the current pending elaboration list and make a new
one. */
-extern void push_pending_elaborations PARAMS ((void));
+extern void push_pending_elaborations (void);
/* Pop the stack of pending elaborations. */
-extern void pop_pending_elaborations PARAMS ((void));
+extern void pop_pending_elaborations (void);
/* Return the current position in pending_elaborations so we can insert
elaborations after that point. */
-extern tree get_elaboration_location PARAMS ((void));
+extern tree get_elaboration_location (void);
/* Insert the current elaborations after ELAB, which is in some elaboration
list. */
-extern void insert_elaboration_list PARAMS ((tree));
+extern void insert_elaboration_list (tree);
/* Add some pending elaborations to the current list. */
-extern void add_pending_elaborations PARAMS ((tree, tree));
+extern void add_pending_elaborations (tree, tree);
/* Returns a FIELD_DECL node. FIELD_NAME the field name, FIELD_TYPE is its
type, and RECORD_TYPE is the type of the parent. PACKED is nonzero if
@@ -567,14 +555,13 @@
it is the specified size for this field. If POS is nonzero, it is the bit
position. If ADDRESSABLE is nonzero, it means we are allowed to take
the address of this field for aliasing purposes. */
-extern tree create_field_decl PARAMS ((tree, tree, tree, int,
- tree, tree, int));
+extern tree create_field_decl (tree, tree, tree, int, tree, tree, int);
/* Returns a PARM_DECL node. PARAM_NAME is the name of the parameter,
PARAM_TYPE is its type. READONLY is nonzero if the parameter is
readonly (either an IN parameter or an address of a pass-by-ref
parameter). */
-extern tree create_param_decl PARAMS ((tree, tree, int));
+extern tree create_param_decl (tree, tree, int);
/* Returns a FUNCTION_DECL node. SUBPROG_NAME is the name of the subprogram,
ASM_NAME is its assembler name, SUBPROG_TYPE is its type (a FUNCTION_TYPE
@@ -583,25 +570,25 @@
INLINE_FLAG, PUBLIC_FLAG, and EXTERN_FLAG are used to set the appropriate
fields in the FUNCTION_DECL. */
-extern tree create_subprog_decl PARAMS ((tree, tree, tree, tree, int,
- int, int, struct attrib *));
+extern tree create_subprog_decl (tree, tree, tree, tree, int, int, int,
+ struct attrib *);
/* Returns a LABEL_DECL node for LABEL_NAME. */
-extern tree create_label_decl PARAMS ((tree));
+extern tree create_label_decl (tree);
/* Set up the framework for generating code for SUBPROG_DECL, a subprogram
body. This routine needs to be invoked before processing the declarations
appearing in the subprogram. */
-extern void begin_subprog_body PARAMS ((tree));
+extern void begin_subprog_body (tree);
/* Finish the definition of the current subprogram and compile it all the way
to assembler language output. */
-extern void end_subprog_body PARAMS ((void));
+extern void end_subprog_body (void);
/* Build a template of type TEMPLATE_TYPE from the array bounds of ARRAY_TYPE.
EXPR is an expression that we can use to locate any PLACEHOLDER_EXPRs.
Return a constructor for the template. */
-extern tree build_template PARAMS ((tree, tree, tree));
+extern tree build_template (tree, tree, tree);
/* Build a VMS descriptor from a Mechanism_Type, which must specify
a descriptor type, and the GCC type of an object. Each FIELD_DECL
@@ -610,8 +597,7 @@
to print out an error message if the mechanism cannot be applied to
an object of that type and also for the name. */
-extern tree build_vms_descriptor PARAMS ((tree, Mechanism_Type,
- Entity_Id));
+extern tree build_vms_descriptor (tree, Mechanism_Type, Entity_Id);
/* Build a type to be used to represent an aliased object whose nominal
type is an unconstrained array. This consists of a RECORD_TYPE containing
@@ -619,32 +605,32 @@
ARRAY_TYPE. If ARRAY_TYPE is that of the unconstrained array, this
is used to represent an arbitrary unconstrained object. Use NAME
as the name of the record. */
-extern tree build_unc_object_type PARAMS ((tree, tree, tree));
+extern tree build_unc_object_type (tree, tree, tree);
/* Update anything previously pointing to OLD_TYPE to point to NEW_TYPE. In
the normal case this is just two adjustments, but we have more to do
if NEW is an UNCONSTRAINED_ARRAY_TYPE. */
-extern void update_pointer_to PARAMS ((tree, tree));
+extern void update_pointer_to (tree, tree);
/* EXP is an expression for the size of an object. If this size contains
discriminant references, replace them with the maximum (if MAX_P) or
minimum (if ! MAX_P) possible value of the discriminant. */
-extern tree max_size PARAMS ((tree, int));
+extern tree max_size (tree, int);
/* Remove all conversions that are done in EXP. This includes converting
from a padded type or to a left-justified modular type. If TRUE_ADDRESS
is nonzero, always return the address of the containing object even if
the address is not bit-aligned. */
-extern tree remove_conversions PARAMS ((tree, int));
+extern tree remove_conversions (tree, int);
/* If EXP's type is an UNCONSTRAINED_ARRAY_TYPE, return an expression that
refers to the underlying array. If its type has TYPE_CONTAINS_TEMPLATE_P,
likewise return an expression pointing to the underlying array. */
-extern tree maybe_unconstrained_array PARAMS ((tree));
+extern tree maybe_unconstrained_array (tree);
/* Return an expression that does an unchecked converstion of EXPR to TYPE.
If NOTRUNC_P is set, truncation operations should be suppressed. */
-extern tree unchecked_convert PARAMS ((tree, tree, int));
+extern tree unchecked_convert (tree, tree, int);
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR or other logical
operation.
@@ -658,55 +644,55 @@
The resulting type should always be the same as the input type.
This function is simpler than the corresponding C version since
the only possible operands will be things of Boolean type. */
-extern tree gnat_truthvalue_conversion PARAMS((tree));
+extern tree gnat_truthvalue_conversion (tree);
/* Return the base type of TYPE. */
-extern tree get_base_type PARAMS((tree));
+extern tree get_base_type (tree);
/* Likewise, but only return types known at Ada source. */
-extern tree get_ada_base_type PARAMS((tree));
+extern tree get_ada_base_type (tree);
/* EXP is a GCC tree representing an address. See if we can find how
strictly the object at that address is aligned. Return that alignment
strictly the object at that address is aligned. Return that alignment
in bits. If we don't know anything about the alignment, return 0. */
-extern unsigned int known_alignment PARAMS((tree));
+extern unsigned int known_alignment (tree);
/* Make a binary operation of kind OP_CODE. RESULT_TYPE is the type
desired for the result. Usually the operation is to be performed
in that type. For MODIFY_EXPR and ARRAY_REF, RESULT_TYPE may be 0
in which case the type to be used will be derived from the operands. */
-extern tree build_binary_op PARAMS((enum tree_code, tree, tree, tree));
+extern tree build_binary_op (enum tree_code, tree, tree, tree);
/* Similar, but make unary operation. */
-extern tree build_unary_op PARAMS((enum tree_code, tree, tree));
+extern tree build_unary_op (enum tree_code, tree, tree);
/* Similar, but for COND_EXPR. */
-extern tree build_cond_expr PARAMS((tree, tree, tree, tree));
+extern tree build_cond_expr (tree, tree, tree, tree);
/* Build a CALL_EXPR to call FUNDECL with one argument, ARG. Return
the CALL_EXPR. */
-extern tree build_call_1_expr PARAMS((tree, tree));
+extern tree build_call_1_expr (tree, tree);
/* Build a CALL_EXPR to call FUNDECL with two argument, ARG1 & ARG2. Return
the CALL_EXPR. */
-extern tree build_call_2_expr PARAMS((tree, tree, tree));
+extern tree build_call_2_expr (tree, tree, tree);
/* Likewise to call FUNDECL with no arguments. */
-extern tree build_call_0_expr PARAMS((tree));
+extern tree build_call_0_expr (tree);
/* Call a function that raises an exception and pass the line number and file
name, if requested. MSG says which exception function to call. */
-extern tree build_call_raise PARAMS((int));
+extern tree build_call_raise (int);
/* Return a CONSTRUCTOR of TYPE whose list is LIST. This is not the
same as build_constructor in the language-independent tree.c. */
-extern tree gnat_build_constructor PARAMS((tree, tree));
+extern tree gnat_build_constructor (tree, tree);
/* Return a COMPONENT_REF to access a field that is given by COMPONENT,
an IDENTIFIER_NODE giving the name of the field, FIELD, a FIELD_DECL,
for the field, or both. Don't fold the result if NO_FOLD_P. */
-extern tree build_component_ref PARAMS((tree, tree, tree, int));
+extern tree build_component_ref (tree, tree, tree, int);
/* Build a GCC tree to call an allocation or deallocation function.
If GNU_OBJ is nonzero, it is an object to deallocate. Otherwise,
@@ -715,8 +701,8 @@
GNU_SIZE is the size of the object and ALIGN is the alignment.
GNAT_PROC, if present is a procedure to call and GNAT_POOL is the
storage pool to use. If not preset, malloc and free will be used. */
-extern tree build_call_alloc_dealloc PARAMS((tree, tree, int, Entity_Id,
- Entity_Id, Node_Id));
+extern tree build_call_alloc_dealloc (tree, tree, int, Entity_Id,
+ Entity_Id, Node_Id);
/* Build a GCC tree to correspond to allocating an object of TYPE whose
initial value if INIT, if INIT is nonzero. Convert the expression to
@@ -724,37 +710,36 @@
GNAT_PROC and GNAT_POOL optionally give the procedure to call and
the storage pool to use. GNAT_NODE is used to provide an error
location for restriction violations messages. */
-extern tree build_allocator PARAMS((tree, tree, tree, Entity_Id,
- Entity_Id, Node_Id));
+extern tree build_allocator (tree, tree, tree, Entity_Id, Entity_Id, Node_Id);
/* Fill in a VMS descriptor for EXPR and return a constructor for it.
GNAT_FORMAL is how we find the descriptor record. */
-extern tree fill_vms_descriptor PARAMS((tree, Entity_Id));
+extern tree fill_vms_descriptor (tree, Entity_Id);
/* Indicate that we need to make the address of EXPR_NODE and it therefore
should not be allocated in a register. Return true if successful. */
-extern bool gnat_mark_addressable PARAMS((tree));
+extern bool gnat_mark_addressable (tree);
/* These functions return the basic data type sizes and related parameters
about the target machine. */
-extern Pos get_target_bits_per_unit PARAMS ((void));
-extern Pos get_target_bits_per_word PARAMS ((void));
-extern Pos get_target_char_size PARAMS ((void));
-extern Pos get_target_wchar_t_size PARAMS ((void));
-extern Pos get_target_short_size PARAMS ((void));
-extern Pos get_target_int_size PARAMS ((void));
-extern Pos get_target_long_size PARAMS ((void));
-extern Pos get_target_long_long_size PARAMS ((void));
-extern Pos get_target_float_size PARAMS ((void));
-extern Pos get_target_double_size PARAMS ((void));
-extern Pos get_target_long_double_size PARAMS ((void));
-extern Pos get_target_pointer_size PARAMS ((void));
-extern Pos get_target_maximum_alignment PARAMS ((void));
-extern Boolean get_target_no_dollar_in_label PARAMS ((void));
-extern Nat get_float_words_be PARAMS ((void));
-extern Nat get_words_be PARAMS ((void));
-extern Nat get_bytes_be PARAMS ((void));
-extern Nat get_bits_be PARAMS ((void));
-extern Nat get_strict_alignment PARAMS ((void));
+extern Pos get_target_bits_per_unit (void);
+extern Pos get_target_bits_per_word (void);
+extern Pos get_target_char_size (void);
+extern Pos get_target_wchar_t_size (void);
+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_alignment (void);
+extern Boolean get_target_no_dollar_in_label (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_strict_alignment (void);
diff -u gcc-3.4-20031029/gcc/ada/gmem.c gcc-new/gcc/ada/gmem.c
--- gcc-3.4-20031029/gcc/ada/gmem.c 2003-10-21 09:42:05.000000000 -0400
+++ gcc-new/gcc/ada/gmem.c 2003-10-30 16:30:24.000000000 -0500
@@ -75,7 +75,7 @@
*/
static void
-gmem_read_backtrace ()
+gmem_read_backtrace (void)
{
fread (&cur_tb_len, sizeof (int), 1, gmemfile);
fread (tracebk, sizeof (char *), cur_tb_len, gmemfile);
@@ -120,8 +120,7 @@
write an alloc/free information in buf to be processed by gnatmem */
void
-__gnat_gmem_read_next (buf)
- struct struct_storage_elmt *buf;
+__gnat_gmem_read_next (struct struct_storage_elmt *buf)
{
void *addr;
size_t size;
diff -u gcc-3.4-20031029/gcc/ada/gnatbl.c gcc-new/gcc/ada/gnatbl.c
--- gcc-3.4-20031029/gcc/ada/gnatbl.c 2003-04-24 13:54:04.000000000 -0400
+++ gcc-new/gcc/ada/gnatbl.c 2003-10-30 16:15:41.000000000 -0500
@@ -72,12 +72,11 @@
static int linkonly = 0;
-static void addarg PARAMS ((char *));
-static void process_args PARAMS ((int *, char *[]));
+static void addarg (char *);
+static void process_args (int *, char *[]);
static void
-addarg (str)
- char *str;
+addarg (char *str)
{
int i;
@@ -100,9 +99,7 @@
}
static void
-process_args (p_argc, argv)
- int *p_argc;
- char *argv[];
+process_args (int *p_argc, char *argv[])
{
int i, j;
@@ -199,12 +196,10 @@
}
}
}
-extern int main PARAMS ((int, char **));
+extern int main (int, char **);
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int i, j;
int done_an_ali = 0;
diff -u gcc-3.4-20031029/gcc/ada/init.c gcc-new/gcc/ada/init.c
--- gcc-3.4-20031029/gcc/ada/init.c 2003-10-23 06:15:00.000000000 -0400
+++ gcc-new/gcc/ada/init.c 2003-10-30 14:55:07.000000000 -0500
@@ -71,28 +71,28 @@
extern struct Exception_Data _abort_signal;
#define Lock_Task system__soft_links__lock_task
-extern void (*Lock_Task) PARAMS ((void));
+extern void (*Lock_Task) (void);
#define Unlock_Task system__soft_links__unlock_task
-extern void (*Unlock_Task) PARAMS ((void));
+extern void (*Unlock_Task) (void);
#define Get_Machine_State_Addr \
system__soft_links__get_machine_state_addr
-extern struct Machine_State *(*Get_Machine_State_Addr) PARAMS ((void));
+extern struct Machine_State *(*Get_Machine_State_Addr) (void);
#define Check_Abort_Status \
system__soft_links__check_abort_status
-extern int (*Check_Abort_Status) PARAMS ((void));
+extern int (*Check_Abort_Status) (void);
#define Raise_From_Signal_Handler \
ada__exceptions__raise_from_signal_handler
-extern void Raise_From_Signal_Handler PARAMS ((struct Exception_Data *,
- const char *));
+extern void Raise_From_Signal_Handler (struct Exception_Data *, const char *);
#define Propagate_Signal_Exception \
__gnat_propagate_sig_exc
-extern void Propagate_Signal_Exception
- PARAMS ((struct Machine_State *, struct Exception_Data *, const char *));
+extern void Propagate_Signal_Exception (struct Machine_State *,
+ struct Exception_Data *,
+ const char *);
/* Copies of global values computed by the binder */
int __gl_main_priority = -1;
@@ -134,8 +134,7 @@
's' Interrupt_State pragma set state to System */
char
-__gnat_get_interrupt_state (intrup)
- int intrup;
+__gnat_get_interrupt_state (int intrup)
{
if (intrup >= __gl_num_interrupt_states)
return 'n';
@@ -156,30 +155,18 @@
boundaries like this are not handled correctly in all systems. */
void
-__gnat_set_globals (main_priority,
- time_slice_val,
- wc_encoding,
- locking_policy,
- queuing_policy,
- task_dispatching_policy,
- restrictions,
- interrupt_states,
- num_interrupt_states,
- unreserve_all_interrupts,
- exception_tracebacks,
- zero_cost_exceptions)
- int main_priority;
- int time_slice_val;
- char wc_encoding;
- char locking_policy;
- char queuing_policy;
- char task_dispatching_policy;
- char *restrictions;
- char *interrupt_states;
- int num_interrupt_states;
- int unreserve_all_interrupts;
- int exception_tracebacks;
- int zero_cost_exceptions;
+__gnat_set_globals (int main_priority,
+ int time_slice_val,
+ char wc_encoding,
+ char locking_policy,
+ char queuing_policy,
+ char task_dispatching_policy,
+ char *restrictions,
+ char *interrupt_states,
+ int num_interrupt_states,
+ int unreserve_all_interrupts,
+ int exception_tracebacks,
+ int zero_cost_exceptions)
{
static int already_called = 0;
@@ -288,22 +275,20 @@
#ifndef _AIXVERSION_430
-extern int nanosleep PARAMS ((struct timestruc_t *, struct timestruc_t *));
+extern int nanosleep (struct timestruc_t *, struct timestruc_t *);
int
-nanosleep (Rqtp, Rmtp)
- struct timestruc_t *Rqtp, *Rmtp;
+nanosleep (struct timestruc_t *Rqtp, struct timestruc_t *Rmtp)
{
return nsleep (Rqtp, Rmtp);
}
#endif /* _AIXVERSION_430 */
-static void __gnat_error_handler PARAMS ((int));
+static void __gnat_error_handler (int);
static void
-__gnat_error_handler (sig)
- int sig;
+__gnat_error_handler (int sig)
{
struct Exception_Data *exception;
const char *msg;
@@ -335,7 +320,7 @@
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
@@ -363,7 +348,7 @@
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
@@ -380,20 +365,16 @@
#include <signal.h>
#include <sys/siginfo.h>
-static void __gnat_error_handler PARAMS ((int, siginfo_t *,
- struct sigcontext *));
-extern char *__gnat_get_code_loc PARAMS ((struct sigcontext *));
-extern void __gnat_enter_handler PARAMS ((struct sigcontext *, char *));
-extern size_t __gnat_machine_state_length PARAMS ((void));
+static void __gnat_error_handler (int, siginfo_t *, struct sigcontext *);
+extern char *__gnat_get_code_loc (struct sigcontext *);
+extern void __gnat_enter_handler (struct sigcontext *, char *);
+extern size_t __gnat_machine_state_length (void);
-extern long exc_lookup_gp PARAMS ((char *));
-extern void exc_resume PARAMS ((struct sigcontext *));
+extern long exc_lookup_gp (char *);
+extern void exc_resume (struct sigcontext *);
static void
-__gnat_error_handler (sig, sip, context)
- int sig;
- siginfo_t *sip;
- struct sigcontext *context;
+__gnat_error_handler (int sig, siginfo_t *sip, struct sigcontext *context)
{
struct Exception_Data *exception;
static int recurse = 0;
@@ -463,7 +444,7 @@
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
@@ -471,7 +452,7 @@
exceptions. Make sure that the handler isn't interrupted by another
signal that might cause a scheduling event! */
- act.sa_handler = (void (*) PARAMS ((int))) __gnat_error_handler;
+ act.sa_handler = (void (*) (int)) __gnat_error_handler;
act.sa_flags = SA_ONSTACK | SA_RESTART | SA_NODEFER | SA_SIGINFO;
sigemptyset (&act.sa_mask);
@@ -491,7 +472,7 @@
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
@@ -500,16 +481,13 @@
#define SC_GP 29
char *
-__gnat_get_code_loc (context)
- struct sigcontext *context;
+__gnat_get_code_loc (struct sigcontext *context)
{
return (char *) context->sc_pc;
}
void
-__gnat_enter_handler (context, pc)
- struct sigcontext *context;
- char *pc;
+__gnat_enter_handler ( struct sigcontext *context, char *pc)
{
context->sc_pc = (long) pc;
context->sc_regs[SC_GP] = exc_lookup_gp (pc);
@@ -517,7 +495,7 @@
}
size_t
-__gnat_machine_state_length ()
+__gnat_machine_state_length (void)
{
return sizeof (struct sigcontext);
}
@@ -530,11 +508,10 @@
#include <signal.h>
-static void __gnat_error_handler PARAMS ((int));
+static void __gnat_error_handler (int);
static void
-__gnat_error_handler (sig)
- int sig;
+__gnat_error_handler (int sig)
{
struct Exception_Data *exception;
char *msg;
@@ -566,7 +543,7 @@
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
@@ -609,7 +586,7 @@
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
@@ -639,11 +616,10 @@
unsigned long edi;
};
-static void __gnat_error_handler PARAMS ((int));
+static void __gnat_error_handler (int);
static void
-__gnat_error_handler (sig)
- int sig;
+__gnat_error_handler (int sig)
{
struct Exception_Data *exception;
const char *msg;
@@ -731,7 +707,7 @@
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
@@ -759,7 +735,7 @@
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
@@ -770,13 +746,12 @@
#elif defined (__MINGW32__)
#include <windows.h>
-static LONG WINAPI __gnat_error_handler PARAMS ((PEXCEPTION_POINTERS));
+static LONG WINAPI __gnat_error_handler (PEXCEPTION_POINTERS);
/* __gnat_initialize (mingw32). */
static LONG WINAPI
-__gnat_error_handler (info)
- PEXCEPTION_POINTERS info;
+__gnat_error_handler (PEXCEPTION_POINTERS info)
{
static int recurse;
struct Exception_Data *exception;
@@ -891,14 +866,14 @@
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
SetUnhandledExceptionFilter (__gnat_error_handler);
__gnat_handler_installed = 1;
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
/* Initialize floating-point coprocessor. This call is needed because
@@ -921,11 +896,10 @@
#include <signal.h>
-static void __gnat_error_handler PARAMS ((int));
+static void __gnat_error_handler (int);
static void
-__gnat_error_handler (sig)
- int sig;
+__gnat_error_handler (int sig)
{
struct Exception_Data *exception;
char *msg;
@@ -956,7 +930,7 @@
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
@@ -982,7 +956,7 @@
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
__gnat_init_float ();
}
@@ -994,7 +968,7 @@
#elif defined (__Lynx__)
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
__gnat_init_float ();
}
@@ -1004,7 +978,7 @@
/*********************************/
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
__gnat_handler_installed = 1;
}
@@ -1016,7 +990,7 @@
#elif defined (__EMX__) /* OS/2 dependent initialization */
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
@@ -1025,7 +999,7 @@
/*********************************/
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
__gnat_handler_installed = 1;
}
@@ -1052,13 +1026,10 @@
sigcontext_t context;
};
-static void __gnat_error_handler PARAMS ((int, int, sigcontext_t *));
+static void __gnat_error_handler (int, int, sigcontext_t *);
static void
-__gnat_error_handler (sig, code, sc)
- int sig;
- int code;
- sigcontext_t *sc;
+__gnat_error_handler (int sig, int code, sigcontext_t *sc)
{
struct Machine_State *mstate;
struct Exception_Data *exception;
@@ -1138,7 +1109,7 @@
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
@@ -1169,7 +1140,7 @@
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
@@ -1182,12 +1153,10 @@
#include <signal.h>
#include <siginfo.h>
-static void __gnat_error_handler PARAMS ((int, siginfo_t *));
+static void __gnat_error_handler (int, siginfo_t *);
static void
-__gnat_error_handler (sig, sip)
- int sig;
- siginfo_t *sip;
+__gnat_error_handler (int sig, siginfo_t *sip)
{
struct Exception_Data *exception;
static int recurse = 0;
@@ -1253,7 +1222,7 @@
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
@@ -1279,7 +1248,7 @@
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
@@ -1291,7 +1260,7 @@
/* The prehandler actually gets control first on a condition. It swaps the
stack pointer and calls the handler (__gnat_error_handler). */
-extern long __gnat_error_prehandler ();
+extern long __gnat_error_prehandler (void);
extern char *__gnat_error_prehandler_stack; /* Alternate signal stack */
@@ -1329,12 +1298,10 @@
struct descriptor_s {unsigned short len, mbz; char *adr; };
-long __gnat_error_handler PARAMS ((int *, void *));
+long __gnat_error_handler (int *, void *);
long
-__gnat_error_handler (sigargs, mechargs)
- int *sigargs;
- void *mechargs;
+__gnat_error_handler (int *sigargs, void *mechargs)
{
struct Exception_Data *exception = 0;
char *msg = "";
@@ -1470,7 +1437,7 @@
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
long prvhnd;
char *c;
@@ -1485,7 +1452,7 @@
}
void
-__gnat_initialize()
+__gnat_initialize(void)
{
}
@@ -1508,10 +1475,10 @@
/* getpid is used by s-parint.adb, but is not defined by VxWorks, except
on Alpha VxWorks */
-extern long getpid PARAMS ((void));
+extern long getpid (void);
long
-getpid ()
+getpid (void)
{
return taskIdSelf ();
}
@@ -1519,17 +1486,13 @@
/* This is needed by the GNAT run time to handle Vxworks interrupts */
int
-__gnat_inum_to_ivec (num)
- int num;
+__gnat_inum_to_ivec (int num)
{
return INUM_TO_IVEC (num);
}
static void
-__gnat_error_handler (sig, code, sc)
- int sig;
- int code;
- struct sigcontext *sc;
+__gnat_error_handler (int sig, int code, struct sigcontext *sc)
{
struct Exception_Data *exception;
sigset_t mask;
@@ -1576,7 +1539,7 @@
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
@@ -1601,7 +1564,7 @@
#define HAVE_GNAT_INIT_FLOAT
void
-__gnat_init_float ()
+__gnat_init_float (void)
{
/* Disable overflow/underflow exceptions on the PPC processor, this is needed
to get correct Ada semantic. */
@@ -1631,7 +1594,7 @@
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
__gnat_init_float ();
@@ -1661,8 +1624,7 @@
#include <unistd.h>
static void
-__gnat_error_handler (sig)
- int sig;
+__gnat_error_handler (int sig)
{
struct Exception_Data *exception;
const char *msg;
@@ -1694,7 +1656,7 @@
}
void
-__gnat_install_handler()
+__gnat_install_handler(void)
{
struct sigaction act;
@@ -1714,7 +1676,7 @@
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
__gnat_install_handler ();
__gnat_init_float ();
@@ -1726,12 +1688,12 @@
#elif defined(__rtems__)
-extern void __gnat_install_handler ();
+extern void __gnat_install_handler (void);
/* For RTEMS, each bsp will provide a custom __gnat_install_handler (). */
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
__gnat_install_handler ();
}
@@ -1742,12 +1704,12 @@
#elif defined(__rtems__)
-extern void __gnat_install_handler ();
+extern void __gnat_install_handler (void);
/* For RTEMS, each bsp will provide a custom __gnat_install_handler (). */
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
__gnat_install_handler ();
}
@@ -1762,7 +1724,7 @@
/***************************************/
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
@@ -1771,7 +1733,7 @@
/********************************************/
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
__gnat_handler_installed = 1;
}
@@ -1792,7 +1754,7 @@
#define HAVE_GNAT_INIT_FLOAT
void
-__gnat_init_float ()
+__gnat_init_float (void)
{
#if defined (__i386__) || defined (i386)
@@ -1809,7 +1771,7 @@
/* All targets without a specific __gnat_init_float will use an empty one */
void
-__gnat_init_float ()
+__gnat_init_float (void)
{
}
#endif
diff -u gcc-3.4-20031029/gcc/ada/misc.c gcc-new/gcc/ada/misc.c
--- gcc-3.4-20031029/gcc/ada/misc.c 2003-10-29 05:26:14.000000000 -0500
+++ gcc-new/gcc/ada/misc.c 2003-10-30 15:24:10.000000000 -0500
@@ -359,7 +359,7 @@
/* Perform all the initialization steps that are language-specific. */
static bool
-gnat_init ()
+gnat_init (void)
{
/* Performs whatever initialization steps needed by the language-dependent
lexical analyzer. */
@@ -396,7 +396,7 @@
objects. */
void
-gnat_compute_largest_alignment ()
+gnat_compute_largest_alignment (void)
{
enum machine_mode mode;
@@ -413,7 +413,7 @@
various language dependent hooks. */
void
-gnat_init_gcc_eh ()
+gnat_init_gcc_eh (void)
{
/* We shouldn't do anything if the No_Exceptions_Handler pragma is set,
though. This could for instance lead to the emission of tables with
diff -u gcc-3.4-20031029/gcc/ada/mkdir.c gcc-new/gcc/ada/mkdir.c
--- gcc-3.4-20031029/gcc/ada/mkdir.c 2003-10-21 09:42:09.000000000 -0400
+++ gcc-new/gcc/ada/mkdir.c 2003-10-30 16:30:42.000000000 -0500
@@ -48,8 +48,7 @@
/* This function provides a portable binding to the mkdir function. */
int
-__gnat_mkdir (dir_name)
- char *dir_name;
+__gnat_mkdir (char *dir_name)
{
#if defined (_WIN32) || defined (__vxworks)
return mkdir (dir_name);
diff -u gcc-3.4-20031029/gcc/ada/raise.c gcc-new/gcc/ada/raise.c
--- gcc-3.4-20031029/gcc/ada/raise.c 2003-10-21 09:42:13.000000000 -0400
+++ gcc-new/gcc/ada/raise.c 2003-10-30 15:05:59.000000000 -0500
@@ -58,9 +58,7 @@
/* We have not yet figured out how to import this directly */
void
-_gnat_builtin_longjmp (ptr, flag)
- void *ptr;
- int flag ATTRIBUTE_UNUSED;
+_gnat_builtin_longjmp (void *ptr, int flag ATTRIBUTE_UNUSED)
{
__builtin_longjmp (ptr, 1);
}
@@ -72,7 +70,7 @@
performs any system dependent cleanup required. */
void
-__gnat_unhandled_terminate ()
+__gnat_unhandled_terminate (void)
{
/* Special termination handling for VMS */
@@ -108,10 +106,10 @@
typedef struct _Unwind_Exception _Unwind_Exception;
_Unwind_Reason_Code
-__gnat_Unwind_RaiseException PARAMS ((_Unwind_Exception *));
+__gnat_Unwind_RaiseException (_Unwind_Exception *);
_Unwind_Reason_Code
-__gnat_Unwind_ForcedUnwind PARAMS ((_Unwind_Exception *, void *, void *));
+__gnat_Unwind_ForcedUnwind (_Unwind_Exception *, void *, void *);
#ifdef IN_RTS /* For eh personality routine */
@@ -540,9 +538,7 @@
} region_descriptor;
static void
-db_region_for (region, uw_context)
- region_descriptor *region;
- _Unwind_Context *uw_context;
+db_region_for (region_descriptor *region, _Unwind_Context *uw_context)
{
_Unwind_Ptr ip = _Unwind_GetIP (uw_context) - 1;
@@ -563,9 +559,7 @@
ttype table. */
static const _Unwind_Ptr
-get_ttype_entry_for (region, filter)
- region_descriptor *region;
- long filter;
+get_ttype_entry_for (region_descriptor *region, long filter)
{
_Unwind_Ptr ttype_entry;
@@ -580,9 +574,8 @@
/* Fill out the REGION descriptor for the provided UW_CONTEXT. */
static void
-get_region_description_for (uw_context, region)
- _Unwind_Context *uw_context;
- region_descriptor *region;
+get_region_description_for (_Unwind_Context *uw_context,
+ region_descriptor *region)
{
const unsigned char * p;
_Unwind_Word tmp;
@@ -674,9 +667,7 @@
static void
-db_action_for (action, uw_context)
- action_descriptor *action;
- _Unwind_Context *uw_context;
+db_action_for (action_descriptor *action, _Unwind_Context *uw_context)
{
_Unwind_Ptr ip = _Unwind_GetIP (uw_context) - 1;
@@ -725,10 +716,9 @@
#define __builtin_eh_return_data_regno(x) x
static void
-get_call_site_action_for (uw_context, region, action)
- _Unwind_Context *uw_context;
- region_descriptor *region;
- action_descriptor *action;
+get_call_site_action_for (_Unwind_Context *uw_context,
+ region_descriptor *region,
+ action_descriptor *action)
{
_Unwind_Ptr call_site
= _Unwind_GetIP (uw_context) - 1;
@@ -786,10 +776,9 @@
/* ! __USING_SJLJ_EXCEPTIONS__ */
static void
-get_call_site_action_for (uw_context, region, action)
- _Unwind_Context *uw_context;
- region_descriptor *region;
- action_descriptor *action;
+get_call_site_action_for (_Unwind_Context *uw_context,
+ region_descriptor *region,
+ action_descriptor *action)
{
_Unwind_Ptr ip
= _Unwind_GetIP (uw_context) - 1;
@@ -861,11 +850,10 @@
UW_CONTEXT in REGION. */
static void
-get_action_description_for (uw_context, uw_exception, region, action)
- _Unwind_Context *uw_context;
- _Unwind_Exception *uw_exception;
- region_descriptor *region;
- action_descriptor *action;
+get_action_description_for (_Unwind_Context *uw_context,
+ _Unwind_Exception *uw_exception,
+ region_descriptor *regionr,
+ action_descriptor *actionr)
{
_GNAT_Exception * gnat_exception = (_GNAT_Exception *) uw_exception;
@@ -950,11 +938,10 @@
occured. */
static void
-setup_to_install (uw_context, uw_exception, uw_landing_pad, uw_filter)
- _Unwind_Context *uw_context;
- _Unwind_Exception *uw_exception;
- int uw_filter;
- _Unwind_Ptr uw_landing_pad;
+setup_to_install (_Unwind_Context *uw_context,
+ _Unwind_Exception *uw_exception,
+ int uw_filter,
+ _Unwind_Ptr uw_landing_pad)
{
#ifndef EH_RETURN_DATA_REGNO
/* We should not be called if the appropriate underlying support is not
@@ -981,20 +968,18 @@
/* The following is defined from a-except.adb. Its purpose is to enable
automatic backtraces upon exception raise, as provided through the
GNAT.Traceback facilities. */
-extern void __gnat_notify_handled_exception PARAMS ((void));
-extern void __gnat_notify_unhandled_exception PARAMS ((void));
+extern void __gnat_notify_handled_exception (void);
+extern void __gnat_notify_unhandled_exception (void);
/* Below is the eh personality routine per se. We currently assume that only
GNU-Ada exceptions are met. */
_Unwind_Reason_Code
-__gnat_eh_personality (uw_version, uw_phases,
- uw_exception_class, uw_exception, uw_context)
- int uw_version;
- _Unwind_Action uw_phases;
- _Unwind_Exception_Class uw_exception_class;
- _Unwind_Exception *uw_exception;
- _Unwind_Context *uw_context;
+__gnat_eh_personality (int uw_version,
+ _Unwind_Action uw_phases,
+ _Unwind_Exception_Class uw_exception_class,
+ _Unwind_Exception *uw_exception,
+ _Unwind_Context *uw_context)
{
_GNAT_Exception * gnat_exception = (_GNAT_Exception *) uw_exception;
@@ -1075,8 +1060,7 @@
#undef _Unwind_RaiseException
_Unwind_Reason_Code
-__gnat_Unwind_RaiseException (e)
- _Unwind_Exception *e;
+__gnat_Unwind_RaiseException (_Unwind_Exception *e)
{
return _Unwind_SjLj_RaiseException (e);
}
@@ -1085,10 +1069,9 @@
#undef _Unwind_ForcedUnwind
_Unwind_Reason_Code
-__gnat_Unwind_ForcedUnwind (e, handler, argument)
- _Unwind_Exception *e;
- void * handler;
- void * argument;
+__gnat_Unwind_ForcedUnwind (_Unwind_Exception *e,
+ void * handler,
+ void * argument)
{
return _Unwind_SjLj_ForcedUnwind (e, handler, argument);
}
@@ -1097,17 +1080,15 @@
#else /* __USING_SJLJ_EXCEPTIONS__ */
_Unwind_Reason_Code
-__gnat_Unwind_RaiseException (e)
- _Unwind_Exception *e;
+__gnat_Unwind_RaiseException (_Unwind_Exception *e)
{
return _Unwind_RaiseException (e);
}
_Unwind_Reason_Code
-__gnat_Unwind_ForcedUnwind (e, handler, argument)
- _Unwind_Exception *e;
- void * handler;
- void * argument;
+__gnat_Unwind_ForcedUnwind (_Unwind_Exception *e,
+ void * handler,
+ void * argument)
{
return _Unwind_ForcedUnwind (e, handler, argument);
}
@@ -1127,18 +1108,16 @@
functions never to be called. */
_Unwind_Reason_Code
-__gnat_Unwind_RaiseException (e)
- _Unwind_Exception *e ATTRIBUTE_UNUSED;
+__gnat_Unwind_RaiseException (_Unwind_Exception *e ATTRIBUTE_UNUSED)
{
abort ();
}
_Unwind_Reason_Code
-__gnat_Unwind_ForcedUnwind (e, handler, argument)
- _Unwind_Exception *e ATTRIBUTE_UNUSED;
- void * handler ATTRIBUTE_UNUSED;
- void * argument ATTRIBUTE_UNUSED;
+__gnat_Unwind_ForcedUnwind (_Unwind_Exception *e ATTRIBUTE_UNUSED,
+ void * handler ATTRIBUTE_UNUSED,
+ void * argument ATTRIBUTE_UNUSED)
{
abort ();
}
diff -u gcc-3.4-20031029/gcc/ada/socket.c gcc-new/gcc/ada/socket.c
--- gcc-3.4-20031029/gcc/ada/socket.c 2003-10-21 09:42:22.000000000 -0400
+++ gcc-new/gcc/ada/socket.c 2003-10-30 16:19:08.000000000 -0500
@@ -66,19 +66,18 @@
#include "raise.h"
-extern void __gnat_free_socket_set PARAMS ((fd_set *));
-extern void __gnat_last_socket_in_set PARAMS ((fd_set *, int *));
-extern void __gnat_get_socket_from_set PARAMS ((fd_set *, int *, int *));
-extern void __gnat_insert_socket_in_set PARAMS ((fd_set *, int));
-extern int __gnat_is_socket_in_set PARAMS ((fd_set *, int));
-extern fd_set *__gnat_new_socket_set PARAMS ((fd_set *));
-extern void __gnat_remove_socket_from_set PARAMS ((fd_set *, int));
+extern void __gnat_free_socket_set (fd_set *);
+extern void __gnat_last_socket_in_set (fd_set *, int *);
+extern void __gnat_get_socket_from_set (fd_set *, int *, int *);
+extern void __gnat_insert_socket_in_set (fd_set *, int);
+extern int __gnat_is_socket_in_set (fd_set *, int);
+extern fd_set *__gnat_new_socket_set (fd_set *);
+extern void __gnat_remove_socket_from_set (fd_set *, int);
/* Free socket set. */
void
-__gnat_free_socket_set (set)
- fd_set *set;
+__gnat_free_socket_set (fd_set *set)
{
__gnat_free (set);
}
@@ -89,9 +88,7 @@
actual largest socket in the socket set. */
void
-__gnat_last_socket_in_set (set, last)
- fd_set *set;
- int *last;
+__gnat_last_socket_in_set (fd_set *set, int *last)
{
int s;
int l;
@@ -122,10 +119,7 @@
socket in the socket set. */
void
-__gnat_get_socket_from_set (set, last, socket)
- fd_set *set;
- int *last;
- int *socket;
+__gnat_get_socket_from_set (fd_set *set, int *last, int *socket)
{
*socket = *last;
FD_CLR (*socket, set);
@@ -135,9 +129,7 @@
/* Insert SOCKET in the socket set SET. */
void
-__gnat_insert_socket_in_set (set, socket)
- fd_set *set;
- int socket;
+__gnat_insert_socket_in_set (fd_set *set, int socket)
{
FD_SET (socket, set);
}
@@ -145,9 +137,7 @@
/* Check whether a given SOCKET is in the socket set SET. */
int
-__gnat_is_socket_in_set (set, socket)
- fd_set *set;
- int socket;
+__gnat_is_socket_in_set (fd_set *set, int socket)
{
return FD_ISSET (socket, set);
}
@@ -155,8 +145,7 @@
/* Allocate a new socket set and set it as empty. */
fd_set *
-__gnat_new_socket_set (set)
- fd_set *set;
+__gnat_new_socket_set (fd_set *set)
{
fd_set *new;
@@ -173,9 +162,7 @@
/* Remove SOCKET from the socket set SET. */
void
-__gnat_remove_socket_from_set (set, socket)
- fd_set *set;
- int socket;
+__gnat_remove_socket_from_set (fd_set *set, int socket)
{
FD_CLR (socket, set);
}
diff -u gcc-3.4-20031029/gcc/ada/sysdep.c gcc-new/gcc/ada/sysdep.c
--- gcc-3.4-20031029/gcc/ada/sysdep.c 2003-10-22 17:34:51.000000000 -0400
+++ gcc-new/gcc/ada/sysdep.c 2003-10-30 16:25:04.000000000 -0500
@@ -157,15 +157,13 @@
const char __gnat_text_translation_required = 1;
void
-__gnat_set_binary_mode (handle)
- int handle;
+__gnat_set_binary_mode (int handle)
{
_setmode (handle, O_BINARY);
}
void
-__gnat_set_text_mode (handle)
- int handle;
+__gnat_set_text_mode (int handle)
{
_setmode (handle, O_TEXT);
}
@@ -178,8 +176,7 @@
"console". */
char *
-__gnat_ttyname (filedes)
- int filedes;
+__gnat_ttyname (int filedes)
{
if (isatty (filedes))
return "console";
@@ -206,22 +203,22 @@
Calling FlushConsoleInputBuffer just after getch() fix the bug under
95/98. */
-static void winflush_init PARAMS ((void));
+static void winflush_init (void);
-static void winflush_95 PARAMS ((void));
+static void winflush_95 (void);
-static void winflush_nt PARAMS ((void));
+static void winflush_nt (void);
/* winflusfunction is set first to the winflushinit function which will check
the OS version 95/98 or NT/2000 */
-static void (*winflush_function) PARAMS ((void)) = winflush_init;
+static void (*winflush_function) (void) = winflush_init;
/* This function does the runtime check of the OS version and then sets
winflush_function to the appropriate function and then call it. */
static void
-winflush_init ()
+winflush_init (void)
{
DWORD dwVersion = GetVersion();
@@ -234,12 +231,12 @@
}
-static void winflush_95 ()
+static void winflush_95 (void)
{
FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE));
}
-static void winflush_nt ()
+static void winflush_nt (void)
{
/* Does nothing as there is no problem under NT. */
}
@@ -264,22 +261,19 @@
/* These functions do nothing in non-DOS systems. */
void
-__gnat_set_binary_mode (handle)
- int handle ATTRIBUTE_UNUSED;
+__gnat_set_binary_mode (int handle ATTRIBUTE_UNUSED)
{
}
void
-__gnat_set_text_mode (handle)
- int handle ATTRIBUTE_UNUSED;
+__gnat_set_text_mode (int handle ATTRIBUTE_UNUSED)
{
}
char *
-__gnat_ttyname (filedes)
- int filedes;
+__gnat_ttyname (int filedes)
{
#ifndef __vxworks
- extern char *ttyname PARAMS ((int));
+ extern char *ttyname (int);
return ttyname (filedes);
@@ -315,18 +309,14 @@
/* Implements the common processing for getc_immediate and
getc_immediate_nowait. */
-extern void getc_immediate PARAMS ((FILE *, int *, int *));
-extern void getc_immediate_nowait PARAMS ((FILE *, int *, int *, int *));
-extern void getc_immediate_common PARAMS ((FILE *, int *, int *,
- int *, int));
+extern void getc_immediate (FILE *, int *, int *);
+extern void getc_immediate_nowait (FILE *, int *, int *, int *);
+extern void getc_immediate_common (FILE *, int *, int *, int *, int);
/* Called by Get_Immediate (Foo); */
void
-getc_immediate (stream, ch, end_of_file)
- FILE *stream;
- int *ch;
- int *end_of_file;
+getc_immediate (FILE *stream, int *ch, int *end_of_file)
{
int avail;
@@ -336,11 +326,7 @@
/* Called by Get_Immediate (Foo, Available); */
void
-getc_immediate_nowait (stream, ch, end_of_file, avail)
- FILE *stream;
- int *ch;
- int *end_of_file;
- int *avail;
+getc_immediate_nowait (FILE *stream, int *ch, int *end_of_file, int *avail)
{
getc_immediate_common (stream, ch, end_of_file, avail, 0);
}
@@ -348,12 +334,11 @@
/* Called by getc_immediate () and getc_immediate_nowait () */
void
-getc_immediate_common (stream, ch, end_of_file, avail, waiting)
- FILE *stream;
- int *ch;
- int *end_of_file;
- int *avail;
- int waiting;
+getc_immediate_common (FILE *stream,
+ int *ch,
+ int *end_of_file,
+ int *avail,
+ int waiting)
{
#if defined (linux) || defined (sun) || defined (sgi) || defined (__EMX__) \
|| (defined (__osf__) && ! defined (__alpha_vxworks)) \
@@ -614,31 +599,31 @@
will want to import these). We use the same names as the routines used
by AdaMagic for compatibility. */
-char *rts_get_hInstance PARAMS ((void));
-char *rts_get_hPrevInstance PARAMS ((void));
-char *rts_get_lpCommandLine PARAMS ((void));
-int rts_get_nShowCmd PARAMS ((void));
+char *rts_get_hInstance (void);
+char *rts_get_hPrevInstance (void);
+char *rts_get_lpCommandLine (void);
+int rts_get_nShowCmd (void);
char *
-rts_get_hInstance ()
+rts_get_hInstance (void)
{
return (char *)GetModuleHandleA (0);
}
char *
-rts_get_hPrevInstance ()
+rts_get_hPrevInstance (void)
{
return 0;
}
char *
-rts_get_lpCommandLine ()
+rts_get_lpCommandLine (void)
{
return GetCommandLineA ();
}
int
-rts_get_nShowCmd ()
+rts_get_nShowCmd (void)
{
return 1;
}
@@ -650,10 +635,10 @@
#include <time.h>
-extern long get_gmtoff PARAMS ((void));
+extern long get_gmtoff (void);
long
-get_gmtoff ()
+get_gmtoff (void)
{
time_t t;
struct tm *ts;
@@ -668,22 +653,19 @@
#if defined (_AIX) || defined (__EMX__)
#define Lock_Task system__soft_links__lock_task
-extern void (*Lock_Task) PARAMS ((void));
+extern void (*Lock_Task) (void);
#define Unlock_Task system__soft_links__unlock_task
-extern void (*Unlock_Task) PARAMS ((void));
+extern void (*Unlock_Task) (void);
/* Provide reentrant version of localtime on Aix and OS/2. Note that AiX does
provide localtime_r, but in the library libc_r which doesn't get included
systematically, so we can't use it. */
-extern struct tm *__gnat_localtime_r PARAMS ((const time_t *,
- struct tm *));
+extern struct tm *__gnat_localtime_r (const time_t *, struct tm *);
struct tm *
-__gnat_localtime_r (timer, tp)
- const time_t *timer;
- struct tm *tp;
+__gnat_localtime_r (const time_t *timer, struct tm *tp)
{
struct tm *tmp;
@@ -703,12 +685,10 @@
spec is required. Only use when ___THREADS_POSIX4ad4__ is defined,
the Lynx convention when building against the legacy API. */
-extern struct tm *__gnat_localtime_r PARAMS ((const time_t *, struct tm *));
+extern struct tm *__gnat_localtime_r (const time_t *, struct tm *);
struct tm *
-__gnat_localtime_r (timer, tp)
- const time_t *timer;
- struct tm *tp;
+__gnat_localtime_r (const time_t *timer, struct tm *tp)
{
localtime_r (tp, timer);
return NULL;
@@ -723,12 +703,10 @@
/* All other targets provide a standard localtime_r */
-extern struct tm *__gnat_localtime_r PARAMS ((const time_t *, struct tm *));
+extern struct tm *__gnat_localtime_r (const time_t *, struct tm *);
struct tm *
-__gnat_localtime_r (timer, tp)
- const time_t *timer;
- struct tm *tp;
+__gnat_localtime_r (const time_t *timer, struct tm *tp)
{
return (struct tm *) localtime_r (timer, tp);
}
diff -u gcc-3.4-20031029/gcc/ada/targtyps.c gcc-new/gcc/ada/targtyps.c
--- gcc-3.4-20031029/gcc/ada/targtyps.c 2003-10-21 09:42:22.000000000 -0400
+++ gcc-new/gcc/ada/targtyps.c 2003-10-30 15:24:52.000000000 -0500
@@ -69,86 +69,86 @@
to determine the sizes that are used for various C types. */
Pos
-get_target_bits_per_unit ()
+get_target_bits_per_unit (void)
{
return BITS_PER_UNIT;
}
Pos
-get_target_bits_per_word ()
+get_target_bits_per_word (void)
{
return BITS_PER_WORD;
}
Pos
-get_target_char_size ()
+get_target_char_size (void)
{
return CHAR_TYPE_SIZE;
}
Pos
-get_target_wchar_t_size ()
+get_target_wchar_t_size (void)
{
/* We never want wide chacters less than "short" in Ada. */
return MAX (SHORT_TYPE_SIZE, WCHAR_TYPE_SIZE);
}
Pos
-get_target_short_size ()
+get_target_short_size (void)
{
return SHORT_TYPE_SIZE;
}
Pos
-get_target_int_size ()
+get_target_int_size (void)
{
return INT_TYPE_SIZE;
}
Pos
-get_target_long_size ()
+get_target_long_size (void)
{
return ADA_LONG_TYPE_SIZE;
}
Pos
-get_target_long_long_size ()
+get_target_long_long_size (void)
{
return LONG_LONG_TYPE_SIZE;
}
Pos
-get_target_float_size ()
+get_target_float_size (void)
{
return FLOAT_TYPE_SIZE;
}
Pos
-get_target_double_size ()
+get_target_double_size (void)
{
return DOUBLE_TYPE_SIZE;
}
Pos
-get_target_long_double_size ()
+get_target_long_double_size (void)
{
return WIDEST_HARDWARE_FP_SIZE;
}
Pos
-get_target_pointer_size ()
+get_target_pointer_size (void)
{
return POINTER_SIZE;
}
Pos
-get_target_maximum_alignment ()
+get_target_maximum_alignment (void)
{
return BIGGEST_ALIGNMENT / BITS_PER_UNIT;
}
Boolean
-get_target_no_dollar_in_label ()
+get_target_no_dollar_in_label (void)
{
#ifdef NO_DOLLAR_IN_LABEL
return 1;
@@ -162,31 +162,31 @@
#endif
Nat
-get_float_words_be ()
+get_float_words_be (void)
{
return FLOAT_WORDS_BIG_ENDIAN;
}
Nat
-get_words_be ()
+get_words_be (void)
{
return WORDS_BIG_ENDIAN;
}
Nat
-get_bytes_be ()
+get_bytes_be (void)
{
return BYTES_BIG_ENDIAN;
}
Nat
-get_bits_be ()
+get_bits_be (void)
{
return BITS_BIG_ENDIAN;
}
Nat
-get_strict_alignment ()
+get_strict_alignment (void)
{
return STRICT_ALIGNMENT;
}
diff -u gcc-3.4-20031029/gcc/ada/tb-alvms.c gcc-new/gcc/ada/tb-alvms.c
--- gcc-3.4-20031029/gcc/ada/tb-alvms.c 2003-10-29 05:26:16.000000000 -0500
+++ gcc-new/gcc/ada/tb-alvms.c 2003-10-30 16:37:07.000000000 -0500
@@ -207,12 +207,11 @@
********************/
int
-__gnat_backtrace (array, size, exclude_min, exclude_max, skip_frames)
- void **array;
- int size;
- void *exclude_min;
- void *exclude_max;
- int skip_frames;
+__gnat_backtrace (void **array,
+ int size,
+ void *exclude_min,
+ void *exclude_max,
+ int skip_frames)
{
int cnt;
diff -u gcc-3.4-20031029/gcc/ada/tb-alvxw.c gcc-new/gcc/ada/tb-alvxw.c
--- gcc-3.4-20031029/gcc/ada/tb-alvxw.c 2003-10-21 09:42:23.000000000 -0400
+++ gcc-new/gcc/ada/tb-alvxw.c 2003-10-30 16:35:42.000000000 -0500
@@ -39,7 +39,7 @@
#include <limits.h>
#include <string.h>
-extern void kerTaskEntry();
+extern void kerTaskEntry(void);
/* We still use a number of macros similar to the ones for the generic
__gnat_backtrace implementation. */
@@ -259,8 +259,7 @@
struct alloc_chain *trace_alloc_chain;
static void *
-trace_alloc (n)
- unsigned int n;
+trace_alloc (unsigned int n)
{
struct alloc_chain * result = malloc (n + sizeof(struct alloc_chain));
@@ -270,7 +269,7 @@
}
static void
-free_trace_alloc ()
+free_trace_alloc (void)
{
while (trace_alloc_chain != 0)
{
@@ -285,9 +284,7 @@
otherwise. */
static int
-read_memory_safe4 (addr, dest)
- CORE_ADDR addr;
- unsigned int *dest;
+read_memory_safe4 (CORE_ADDR addr, unsigned int *dest)
{
*dest = *((unsigned int*) addr);
return 0;
@@ -297,17 +294,14 @@
otherwise. */
static int
-read_memory_safe8 (addr, dest)
- CORE_ADDR addr;
- CORE_ADDR *dest;
+read_memory_safe8 (CORE_ADDR addr, CORE_ADDR *dest)
{
*dest = *((CORE_ADDR*) addr);
return 0;
}
static CORE_ADDR
-read_register (regno)
- int regno;
+read_register (int regno)
{
if (regno >= 0 && regno < 31)
return theRegisters[regno];
@@ -316,23 +310,20 @@
}
static void
-frame_saved_regs_zalloc (fi)
- struct frame_info *fi;
+frame_saved_regs_zalloc (struct frame_info *fi)
{
fi->saved_regs = (CORE_ADDR *) trace_alloc (SIZEOF_FRAME_SAVED_REGS);
memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
}
static void *
-frame_obstack_alloc (size)
- unsigned long size;
+frame_obstack_alloc (unsigned long size)
{
return (void *) trace_alloc (size);
}
static int
-inside_entry_file (addr)
- CORE_ADDR addr;
+inside_entry_file (CORE_ADDR addr)
{
if (addr == 0)
return 1;
@@ -341,8 +332,7 @@
}
static CORE_ADDR
-alpha_saved_pc_after_call (frame)
- struct frame_info *frame;
+alpha_saved_pc_after_call (struct frame_info *frame)
{
CORE_ADDR pc = frame->pc;
alpha_extra_func_info_t proc_desc;
@@ -358,8 +348,7 @@
NULL). */
static void
-alpha_find_saved_regs (frame)
- struct frame_info *frame;
+alpha_find_saved_regs (struct frame_info *frame)
{
int ireg;
CORE_ADDR reg_position;
@@ -430,9 +419,7 @@
}
static CORE_ADDR
-read_next_frame_reg (fi, regno)
- struct frame_info *fi;
- int regno;
+read_next_frame_reg (struct frame_info *fi, int regno)
{
CORE_ADDR result;
for (; fi; fi = fi->next)
@@ -460,8 +447,7 @@
}
static CORE_ADDR
-alpha_frame_saved_pc (frame)
- struct frame_info *frame;
+alpha_frame_saved_pc (struct frame_info *frame)
{
return read_next_frame_reg (frame, frame->pc_reg);
}
@@ -472,8 +458,7 @@
$zero,($ra),1" on alpha. */
static int
-alpha_about_to_return (pc)
- CORE_ADDR pc;
+alpha_about_to_return (CORE_ADDR pc)
{
int inst;
@@ -485,8 +470,7 @@
containing address PC. Returns 0 if none detected. */
static CORE_ADDR
-heuristic_proc_start (pc)
- CORE_ADDR pc;
+heuristic_proc_start (CORE_ADDR pc)
{
CORE_ADDR start_pc = pc;
CORE_ADDR fence = start_pc - heuristic_fence_post;
@@ -512,11 +496,10 @@
}
static alpha_extra_func_info_t
-heuristic_proc_desc (start_pc, limit_pc, next_frame, saved_regs_p)
- CORE_ADDR start_pc;
- CORE_ADDR limit_pc;
- struct frame_info *next_frame;
- struct frame_saved_regs *saved_regs_p;
+heuristic_proc_desc (CORE_ADDR start_pc,
+ CORE_ADDR limit_pc,
+ struct frame_info *next_frame,
+ struct frame_saved_regs *saved_regs_p)
{
CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM);
CORE_ADDR cur_pc;
@@ -641,10 +624,9 @@
}
static alpha_extra_func_info_t
-find_proc_desc (pc, next_frame, saved_regs)
- CORE_ADDR pc;
- struct frame_info *next_frame;
- struct frame_saved_regs *saved_regs;
+find_proc_desc (CORE_ADDR pc,
+ struct frame_info *next_frame,
+ struct frame_saved_regs *saved_regs)
{
CORE_ADDR startaddr;
@@ -660,8 +642,7 @@
}
static CORE_ADDR
-alpha_frame_chain (frame)
- struct frame_info *frame;
+alpha_frame_chain (struct frame_info *frame)
{
alpha_extra_func_info_t proc_desc;
CORE_ADDR saved_pc = FRAME_SAVED_PC (frame);
@@ -685,8 +666,7 @@
}
static void
-init_extra_frame_info (frame)
- struct frame_info *frame;
+init_extra_frame_info (struct frame_info *frame)
{
struct frame_saved_regs temp_saved_regs;
alpha_extra_func_info_t proc_desc =
@@ -729,9 +709,7 @@
Always returns a non-NULL value. */
static struct frame_info *
-create_new_frame (addr, pc)
- CORE_ADDR addr;
- CORE_ADDR pc;
+create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
{
struct frame_info *fi;
@@ -754,19 +732,19 @@
static CORE_ADDR current_pc;
static void
-set_current_pc ()
+set_current_pc (void)
{
current_pc = (CORE_ADDR) __builtin_return_address (0);
}
static CORE_ADDR
-read_pc ()
+read_pc (void)
{
return current_pc;
}
static struct frame_info *
-get_current_frame ()
+get_current_frame (void)
{
return create_new_frame (0, read_pc ());
}
@@ -775,8 +753,7 @@
If FI is the original frame (it has no caller), return 0. */
static struct frame_info *
-get_prev_frame (next_frame)
- struct frame_info *next_frame;
+get_prev_frame (struct frame_info *next_frame)
{
CORE_ADDR address = 0;
struct frame_info *prev;
@@ -897,12 +874,11 @@
"stq $" #regno ", " #disp "(%0)\n"
int
-__gnat_backtrace (array, size, exclude_min, exclude_max, skip_frames)
- void **array;
- int size;
- void *exclude_min;
- void *exclude_max;
- int skip_frames;
+__gnat_backtrace (void **array,
+ int size,
+ void *exclude_min,
+ void *exclude_max,
+ int skip_frames)
{
struct frame_info* top;
struct frame_info* current;
diff -u gcc-3.4-20031029/gcc/ada/tracebak.c gcc-new/gcc/ada/tracebak.c
--- gcc-3.4-20031029/gcc/ada/tracebak.c 2003-10-22 07:34:08.000000000 -0400
+++ gcc-new/gcc/ada/tracebak.c 2003-10-30 16:26:12.000000000 -0500
@@ -58,7 +58,7 @@
#include "system.h"
#endif
-extern int __gnat_backtrace PARAMS ((void **, int, void *, void *, int));
+extern int __gnat_backtrace (void **, int, void *, void *, int);
/* The point is to provide an implementation of the __gnat_bactrace function
above, called by the default implementation of the System.Traceback
@@ -77,10 +77,10 @@
function is still referenced by the default System.Traceback. */
#define Lock_Task system__soft_links__lock_task
-extern void (*Lock_Task) PARAMS ((void));
+extern void (*Lock_Task) (void);
#define Unlock_Task system__soft_links__unlock_task
-extern void (*Unlock_Task) PARAMS ((void));
+extern void (*Unlock_Task) (void);
/*-------------------------------------*
*-- Target specific implementations --*
@@ -339,12 +339,11 @@
#endif
int
-__gnat_backtrace (array, size, exclude_min, exclude_max, skip_frames)
- void **array;
- int size;
- void *exclude_min;
- void *exclude_max;
- int skip_frames;
+__gnat_backtrace (void **array,
+ int size,
+ void *exclude_min,
+ void *exclude_max,
+ int skip_frames)
{
struct layout *current;
void *top_frame;
diff -u gcc-3.4-20031029/gcc/ada/trans.c gcc-new/gcc/ada/trans.c
--- gcc-3.4-20031029/gcc/ada/trans.c 2003-10-29 05:26:16.000000000 -0500
+++ gcc-new/gcc/ada/trans.c 2003-10-30 15:42:36.000000000 -0500
@@ -103,24 +103,22 @@
a return in some functions. See processing for N_Subprogram_Body. */
static GTY(()) tree gnu_return_label_stack;
-static tree tree_transform PARAMS((Node_Id));
-static void elaborate_all_entities PARAMS((Node_Id));
-static void process_freeze_entity PARAMS((Node_Id));
-static void process_inlined_subprograms PARAMS((Node_Id));
-static void process_decls PARAMS((List_Id, List_Id, Node_Id,
- int, int));
-static tree emit_range_check PARAMS((tree, Node_Id));
-static tree emit_index_check PARAMS((tree, tree, tree, tree));
-static tree emit_check PARAMS((tree, tree, int));
-static tree convert_with_check PARAMS((Entity_Id, tree,
- int, int, int));
-static int addressable_p PARAMS((tree));
-static tree assoc_to_constructor PARAMS((Node_Id, tree));
-static tree extract_values PARAMS((tree, tree));
-static tree pos_to_constructor PARAMS((Node_Id, tree, Entity_Id));
-static tree maybe_implicit_deref PARAMS((tree));
-static tree gnat_stabilize_reference_1 PARAMS((tree, int));
-static int build_unit_elab PARAMS((Entity_Id, int, tree));
+static tree tree_transform (Node_Id);
+static void elaborate_all_entities (Node_Id);
+static void process_freeze_entity (Node_Id);
+static void process_inlined_subprograms (Node_Id);
+static void process_decls (List_Id, List_Id, Node_Id, int, int);
+static tree emit_range_check (tree, Node_Id);
+static tree emit_index_check (tree, tree, tree, tree);
+static tree emit_check (tree, tree, int);
+static tree convert_with_check (Entity_Id, tree, int, int, int);
+static int addressable_p (tree);
+static tree assoc_to_constructor (Node_Id, tree);
+static tree extract_values (tree, tree);
+static tree pos_to_constructor (Node_Id, tree, Entity_Id);
+static tree maybe_implicit_deref (tree);
+static tree gnat_stabilize_reference_1 (tree, int);
+static int build_unit_elab (Entity_Id, int, tree);
/* Constants for +0.5 and -0.5 for float-to-integer rounding. */
static REAL_VALUE_TYPE dconstp5;
@@ -130,27 +128,23 @@
structures and then generates code. */
void
-gigi (gnat_root, max_gnat_node, number_name, nodes_ptr, next_node_ptr,
- prev_node_ptr, elists_ptr, elmts_ptr, strings_ptr, string_chars_ptr,
- list_headers_ptr, number_units, file_info_ptr, standard_integer,
- standard_long_long_float, standard_exception_type, gigi_operating_mode)
- Node_Id gnat_root;
- int max_gnat_node;
- int number_name;
- struct Node *nodes_ptr;
- Node_Id *next_node_ptr;
- Node_Id *prev_node_ptr;
- struct Elist_Header *elists_ptr;
- struct Elmt_Item *elmts_ptr;
- struct String_Entry *strings_ptr;
- Char_Code *string_chars_ptr;
- struct List_Header *list_headers_ptr;
- Int number_units ATTRIBUTE_UNUSED;
- char *file_info_ptr ATTRIBUTE_UNUSED;
- Entity_Id standard_integer;
- Entity_Id standard_long_long_float;
- Entity_Id standard_exception_type;
- Int gigi_operating_mode;
+gigi (Node_Id gnat_root,
+ int max_gnat_node,
+ int number_name,
+ struct Node *nodes_ptr,
+ Node_Id *next_node_ptr,
+ Node_Id *prev_node_ptr,
+ struct Elist_Header *elists_ptr,
+ struct Elmt_Item *elmts_ptr,
+ struct String_Entry *strings_ptr,
+ Char_Code *string_chars_ptr,
+ struct List_Header *list_headers_ptr,
+ Int number_units ATTRIBUTE_UNUSED,
+ char *file_info_ptr ATTRIBUTE_UNUSED,
+ Entity_Id standard_integer,
+ Entity_Id standard_long_long_float,
+ Entity_Id standard_exception_type,
+ Int gigi_operating_mode)
{
tree gnu_standard_long_long_float;
tree gnu_standard_exception_type;
@@ -233,8 +227,7 @@
part of the tree. */
void
-gnat_to_code (gnat_node)
- Node_Id gnat_node;
+gnat_to_code (Node_Id gnat_node)
{
tree gnu_root;
@@ -259,8 +252,7 @@
code. */
tree
-gnat_to_gnu (gnat_node)
- Node_Id gnat_node;
+gnat_to_gnu (Node_Id gnat_node)
{
tree gnu_root;
@@ -286,8 +278,7 @@
in the above two routines for most purposes. */
static tree
-tree_transform (gnat_node)
- Node_Id gnat_node;
+tree_transform (Node_Id gnat_node)
{
tree gnu_result = error_mark_node; /* Default to no value. */
tree gnu_result_type = void_type_node;
@@ -4156,8 +4147,7 @@
/* GNU_STMT is a statement. We generate code for that statement. */
void
-gnat_expand_stmt (gnu_stmt)
- tree gnu_stmt;
+gnat_expand_stmt (tree gnu_stmt)
{
set_lineno_from_sloc (TREE_SLOC (gnu_stmt), 1);
@@ -4193,8 +4183,7 @@
information for types in withed units, for ASIS use */
static void
-elaborate_all_entities (gnat_node)
- Node_Id gnat_node;
+elaborate_all_entities (Node_Id gnat_node)
{
Entity_Id gnat_with_clause, gnat_entity;
@@ -4260,8 +4249,7 @@
/* Do the processing of N_Freeze_Entity, GNAT_NODE. */
static void
-process_freeze_entity (gnat_node)
- Node_Id gnat_node;
+process_freeze_entity (Node_Id gnat_node)
{
Entity_Id gnat_entity = Entity (gnat_node);
tree gnu_old;
@@ -4369,8 +4357,7 @@
N_Compilation_Unit. */
static void
-process_inlined_subprograms (gnat_node)
- Node_Id gnat_node;
+process_inlined_subprograms (Node_Id gnat_node)
{
Entity_Id gnat_entity;
Node_Id gnat_body;
@@ -4416,10 +4403,11 @@
correspond to the public and private parts of a package. */
static void
-process_decls (gnat_decls, gnat_decls2, gnat_end_list, pass1p, pass2p)
- List_Id gnat_decls, gnat_decls2;
- Node_Id gnat_end_list;
- int pass1p, pass2p;
+process_decls (List_Id gnat_decls,
+ List_Id gnat_decls2,
+ Node_Id gnat_end_list,
+ int pass1p,
+ int pass2p)
{
List_Id gnat_decl_array[2];
Node_Id gnat_decl;
@@ -4536,9 +4524,7 @@
which we have to check. */
static tree
-emit_range_check (gnu_expr, gnat_range_type)
- tree gnu_expr;
- Entity_Id gnat_range_type;
+emit_range_check (tree gnu_expr, Entity_Id gnat_range_type)
{
tree gnu_range_type = get_unpadded_type (gnat_range_type);
tree gnu_low = TYPE_MIN_VALUE (gnu_range_type);
@@ -4588,11 +4574,10 @@
subprograms having unconstrained array formal parameters */
static tree
-emit_index_check (gnu_array_object, gnu_expr, gnu_low, gnu_high)
- tree gnu_array_object;
- tree gnu_expr;
- tree gnu_low;
- tree gnu_high;
+emit_index_check (tree gnu_array_object,
+ tree gnu_expr,
+ tree gnu_low,
+ tree gnu_high)
{
tree gnu_expr_check;
@@ -4635,10 +4620,7 @@
why the exception was raised. */
static tree
-emit_check (gnu_cond, gnu_expr, reason)
- tree gnu_cond;
- tree gnu_expr;
- int reason;
+emit_check (tree gnu_cond, tree gnu_expr, int reason)
{
tree gnu_call;
tree gnu_result;
@@ -4676,12 +4658,11 @@
truncation; otherwise round. */
static tree
-convert_with_check (gnat_type, gnu_expr, overflow_p, range_p, truncate_p)
- Entity_Id gnat_type;
- tree gnu_expr;
- int overflow_p;
- int range_p;
- int truncate_p;
+convert_with_check (Entity_Id gnat_type,
+ tree gnu_expr,
+ int overflow_p,
+ int range_p,
+ int truncate_p)
{
tree gnu_type = get_unpadded_type (gnat_type);
tree gnu_in_type = TREE_TYPE (gnu_expr);
@@ -4820,8 +4801,7 @@
cases. */
static int
-addressable_p (gnu_expr)
- tree gnu_expr;
+addressable_p (tree gnu_expr)
{
switch (TREE_CODE (gnu_expr))
{
@@ -4883,8 +4863,7 @@
make a GCC type for GNAT_ENTITY and set up the correspondance. */
void
-process_type (gnat_entity)
- Entity_Id gnat_entity;
+process_type (Entity_Id gnat_entity)
{
tree gnu_old
= present_gnu_tree (gnat_entity) ? get_gnu_tree (gnat_entity) : 0;
@@ -4979,9 +4958,7 @@
Return a CONSTRUCTOR to build the record. */
static tree
-assoc_to_constructor (gnat_assoc, gnu_type)
- Node_Id gnat_assoc;
- tree gnu_type;
+assoc_to_constructor (Node_Id gnat_assoc, tree gnu_type)
{
tree gnu_field, gnu_list, gnu_result;
@@ -5030,10 +5007,9 @@
of the array component. It is needed for range checking. */
static tree
-pos_to_constructor (gnat_expr, gnu_array_type, gnat_component_type)
- Node_Id gnat_expr;
- tree gnu_array_type;
- Entity_Id gnat_component_type;
+pos_to_constructor (Node_Id gnat_expr,
+ tree gnu_array_type,
+ Entity_Id gnat_component_type)
{
tree gnu_expr;
tree gnu_expr_list = NULL_TREE;
@@ -5074,9 +5050,7 @@
record, make a recursive call to fill it in as well. */
static tree
-extract_values (values, record_type)
- tree values;
- tree record_type;
+extract_values (tree values, tree record_type)
{
tree result = NULL_TREE;
tree field, tem;
@@ -5123,8 +5097,7 @@
an access object and perform the required dereferences. */
static tree
-maybe_implicit_deref (exp)
- tree exp;
+maybe_implicit_deref (tree exp)
{
/* If the type is a pointer, dereference it. */
@@ -5142,8 +5115,7 @@
/* Protect EXP from multiple evaluation. This may make a SAVE_EXPR. */
tree
-protect_multiple_eval (exp)
- tree exp;
+protect_multiple_eval (tree exp)
{
tree type = TREE_TYPE (exp);
@@ -5182,9 +5154,7 @@
whether to force evaluation of everything. */
tree
-gnat_stabilize_reference (ref, force)
- tree ref;
- int force;
+gnat_stabilize_reference (tree ref, int force)
{
register tree type = TREE_TYPE (ref);
register enum tree_code code = TREE_CODE (ref);
@@ -5280,9 +5250,7 @@
arg to force a SAVE_EXPR for everything. */
static tree
-gnat_stabilize_reference_1 (e, force)
- tree e;
- int force;
+gnat_stabilize_reference_1 (tree e, int force)
{
register enum tree_code code = TREE_CODE (e);
register tree type = TREE_TYPE (e);
@@ -5345,10 +5313,7 @@
Return 1 if we didn't need an elaboration function, zero otherwise. */
static int
-build_unit_elab (gnat_unit, body_p, gnu_elab_list)
- Entity_Id gnat_unit;
- int body_p;
- tree gnu_elab_list;
+build_unit_elab (Entity_Id gnat_unit, int body_p, tree gnu_elab_list)
{
tree gnu_decl;
rtx insn;
@@ -5429,16 +5394,14 @@
return result;
}
-extern char *__gnat_to_canonical_file_spec PARAMS ((char *));
+extern char *__gnat_to_canonical_file_spec (char *);
/* Determine the input_filename and the input_line from the source location
(Sloc) of GNAT_NODE node. Set the global variable input_filename and
input_line. If WRITE_NOTE_P is true, emit a line number note. */
void
-set_lineno (gnat_node, write_note_p)
- Node_Id gnat_node;
- int write_note_p;
+set_lineno (Node_Id gnat_node, int write_note_p)
{
Source_Ptr source_location = Sloc (gnat_node);
@@ -5448,9 +5411,7 @@
/* Likewise, but passed a Sloc. */
void
-set_lineno_from_sloc (source_location, write_note_p)
- Source_Ptr source_location;
- int write_note_p;
+set_lineno_from_sloc (Source_Ptr source_location, int write_note_p)
{
/* If node not from source code, ignore. */
if (source_location < 0)
@@ -5486,9 +5447,7 @@
"&" substitution. */
void
-post_error (msg, node)
- const char *msg;
- Node_Id node;
+post_error (const char *msg, Node_Id node)
{
String_Template temp;
Fat_Pointer fp;
@@ -5503,10 +5462,7 @@
is the node to use for the "&" substitution. */
void
-post_error_ne (msg, node, ent)
- const char *msg;
- Node_Id node;
- Entity_Id ent;
+post_error_ne (const char *msg, Node_Id node, Entity_Id ent)
{
String_Template temp;
Fat_Pointer fp;
@@ -5521,11 +5477,7 @@
to use for the "&" substitution, and N is the number to use for the ^. */
void
-post_error_ne_num (msg, node, ent, n)
- const char *msg;
- Node_Id node;
- Entity_Id ent;
- int n;
+post_error_ne_num (const char *msg, Node_Id node, Entity_Id ent, int n)
{
String_Template temp;
Fat_Pointer fp;
@@ -5545,11 +5497,7 @@
and the text inside square brackets will be output instead. */
void
-post_error_ne_tree (msg, node, ent, t)
- const char *msg;
- Node_Id node;
- Entity_Id ent;
- tree t;
+post_error_ne_tree (const char *msg, Node_Id node, Entity_Id ent, tree t)
{
char *newmsg = alloca (strlen (msg) + 1);
String_Template temp = {1, 0};
@@ -5597,12 +5545,11 @@
integer to write in the message. */
void
-post_error_ne_tree_2 (msg, node, ent, t, num)
- const char *msg;
- Node_Id node;
- Entity_Id ent;
- tree t;
- int num;
+post_error_ne_tree_2 (const char *msg,
+ Node_Id node,
+ Entity_Id ent,
+ tree t,
+ int num)
{
Error_Msg_Uint_2 = UI_From_Int (num);
post_error_ne_tree (msg, node, ent, t);
@@ -5611,8 +5558,7 @@
/* Set the node for a second '&' in the error message. */
void
-set_second_error_entity (e)
- Entity_Id e;
+set_second_error_entity (Entity_Id e)
{
Error_Msg_Node_2 = e;
}
@@ -5621,8 +5567,7 @@
as the relevant node that provides the location info for the error */
void
-gigi_abort (code)
- int code;
+gigi_abort (int code)
{
String_Template temp = {1, 10};
Fat_Pointer fp;
@@ -5637,7 +5582,7 @@
binary and unary operations. */
void
-init_code_table ()
+init_code_table (void)
{
gnu_codes[N_And_Then] = TRUTH_ANDIF_EXPR;
gnu_codes[N_Or_Else] = TRUTH_ORIF_EXPR;
diff -u gcc-3.4-20031029/gcc/ada/utils.c gcc-new/gcc/ada/utils.c
--- gcc-3.4-20031029/gcc/ada/utils.c 2003-10-29 05:26:16.000000000 -0500
+++ gcc-new/gcc/ada/utils.c 2003-10-30 16:01:23.000000000 -0500
@@ -144,22 +144,21 @@
int unused;
};
-static tree merge_sizes PARAMS ((tree, tree, tree, int, int));
-static tree compute_related_constant PARAMS ((tree, tree));
-static tree split_plus PARAMS ((tree, tree *));
-static int value_zerop PARAMS ((tree));
-static tree float_type_for_size PARAMS ((int, enum machine_mode));
-static tree convert_to_fat_pointer PARAMS ((tree, tree));
-static tree convert_to_thin_pointer PARAMS ((tree, tree));
-static tree make_descriptor_field PARAMS ((const char *,tree, tree,
- tree));
-static int value_factor_p PARAMS ((tree, int));
-static int potential_alignment_gap PARAMS ((tree, tree, tree));
+static tree merge_sizes (tree, tree, tree, int, int);
+static tree compute_related_constant (tree, tree);
+static tree split_plus (tree, tree *);
+static int value_zerop (tree);
+static tree float_type_for_size (int, enum machine_mode);
+static tree convert_to_fat_pointer (tree, tree);
+static tree convert_to_thin_pointer (tree, tree);
+static tree make_descriptor_field (const char *,tree, tree, tree);
+static int value_factor_p (tree, int);
+static int potential_alignment_gap (tree, tree, tree);
/* Initialize the association of GNAT nodes to GCC trees. */
void
-init_gnat_to_gnu ()
+init_gnat_to_gnu (void)
{
associate_gnat_to_gnu
= (tree *) ggc_alloc_cleared (max_gnat_nodes * sizeof (tree));
@@ -174,10 +173,7 @@
If GNU_DECL is zero, a previous association is to be reset. */
void
-save_gnu_tree (gnat_entity, gnu_decl, no_check)
- Entity_Id gnat_entity;
- tree gnu_decl;
- int no_check;
+save_gnu_tree (Entity_Id gnat_entity, tree gnu_decl, int no_check)
{
/* Check that GNAT_ENTITY is not already defined and that it is being set
to something which is a decl. Raise gigi 401 if not. Usually, this
@@ -199,8 +195,7 @@
be elaborated only once, GNAT_ENTITY is really not an entity. */
tree
-get_gnu_tree (gnat_entity)
- Entity_Id gnat_entity;
+get_gnu_tree (Entity_Id gnat_entity)
{
if (! associate_gnat_to_gnu[gnat_entity - First_Node_Id])
gigi_abort (402);
@@ -211,8 +206,7 @@
/* Return nonzero if a GCC tree has been associated with GNAT_ENTITY. */
int
-present_gnu_tree (gnat_entity)
- Entity_Id gnat_entity;
+present_gnu_tree (Entity_Id gnat_entity)
{
return (associate_gnat_to_gnu[gnat_entity - First_Node_Id] != NULL_TREE);
}
@@ -221,7 +215,7 @@
/* Return non-zero if we are currently in the global binding level. */
int
-global_bindings_p ()
+global_bindings_p (void)
{
return (force_global != 0 || current_binding_level == global_binding_level
? -1 : 0);
@@ -231,7 +225,7 @@
is in reverse order (it has to be so for back-end compatibility). */
tree
-getdecls ()
+getdecls (void)
{
return current_binding_level->names;
}
@@ -239,7 +233,7 @@
/* Nonzero if the current level needs to have a BLOCK made. */
int
-kept_level_p ()
+kept_level_p (void)
{
return (current_binding_level->names != 0);
}
@@ -248,8 +242,7 @@
specified for back-end compatibility. */
void
-pushlevel (ignore)
- int ignore ATTRIBUTE_UNUSED;
+pushlevel (int ignore ATTRIBUTE_UNUSED)
{
struct binding_level *newlevel = NULL;
@@ -287,10 +280,7 @@
them into the BLOCK. */
tree
-poplevel (keep, reverse, functionbody)
- int keep;
- int reverse;
- int functionbody;
+poplevel (int keep, int reverse, int functionbody)
{
/* Points to a GCC BLOCK tree node. This is the BLOCK node construted for the
binding level that we are about to exit and which is returned by this
@@ -396,8 +386,7 @@
to handle the BLOCK node inside the BIND_EXPR. */
void
-insert_block (block)
- tree block;
+insert_block (tree block)
{
TREE_USED (block) = 1;
current_binding_level->blocks
@@ -408,8 +397,7 @@
(the one we are currently in). */
void
-set_block (block)
- tree block;
+set_block (tree block)
{
current_binding_level->this_block = block;
current_binding_level->names = chainon (current_binding_level->names,
@@ -422,8 +410,7 @@
Returns the ..._DECL node. */
tree
-pushdecl (decl)
- tree decl;
+pushdecl (tree decl)
{
struct binding_level *b;
@@ -478,7 +465,7 @@
front end has been run. */
void
-gnat_init_decl_processing ()
+gnat_init_decl_processing (void)
{
input_line = 0;
@@ -516,8 +503,7 @@
in the gcc back-end and initialize the global binding level. */
void
-init_gigi_decls (long_long_float_type, exception_type)
- tree long_long_float_type, exception_type;
+init_gigi_decls (tree long_long_float_type, tree exception_type)
{
tree endlink, decl;
unsigned int i;
@@ -708,11 +694,10 @@
on this type; it will be done later. */
void
-finish_record_type (record_type, fieldlist, has_rep, defer_debug)
- tree record_type;
- tree fieldlist;
- int has_rep;
- int defer_debug;
+finish_record_type (tree record_type,
+ tree fieldlist,
+ int has_rep,
+ int defer_debug)
{
enum tree_code code = TREE_CODE (record_type);
tree ada_size = bitsize_zero_node;
@@ -1030,11 +1015,11 @@
We return an expression for the size. */
static tree
-merge_sizes (last_size, first_bit, size, special, has_rep)
- tree last_size;
- tree first_bit, size;
- int special;
- int has_rep;
+merge_sizes (tree last_size,
+ tree first_bit,
+ tree size,
+ int special,
+ int has_rep)
{
tree type = TREE_TYPE (last_size);
tree new;
@@ -1070,8 +1055,7 @@
related by the addition of a constant. Return that constant if so. */
static tree
-compute_related_constant (op0, op1)
- tree op0, op1;
+compute_related_constant (tree op0, tree op1)
{
tree op0_var, op1_var;
tree op0_con = split_plus (op0, &op0_var);
@@ -1092,9 +1076,7 @@
bitsizetype. */
static tree
-split_plus (in, pvar)
- tree in;
- tree *pvar;
+split_plus (tree in, tree *pvar)
{
/* Strip NOPS in order to ease the tree traversal and maximize the
potential for constant or plus/minus discovery. We need to be careful
@@ -1137,12 +1119,12 @@
depressed stack pointer. */
tree
-create_subprog_type (return_type, param_decl_list, cico_list,
- returns_unconstrained, returns_by_ref, returns_with_dsp)
- tree return_type;
- tree param_decl_list;
- tree cico_list;
- int returns_unconstrained, returns_by_ref, returns_with_dsp;
+create_subprog_type (tree return_type,
+ tree param_decl_list,
+ tree cico_list,
+ int returns_unconstrained,
+ int returns_by_ref,
+ int returns_with_dsp)
{
/* A chain of TREE_LIST nodes whose TREE_VALUEs are the data type nodes of
the subprogram formal parameters. This list is generated by traversing the
@@ -1186,8 +1168,7 @@
/* Return a copy of TYPE but safe to modify in any way. */
tree
-copy_type (type)
- tree type;
+copy_type (tree type)
{
tree new = copy_node (type);
@@ -1207,9 +1188,7 @@
TYPE_INDEX_TYPE is INDEX. */
tree
-create_index_type (min, max, index)
- tree min, max;
- tree index;
+create_index_type (tree min, tree max, tree index)
{
/* First build a type for the desired range. */
tree type = build_index_2_type (min, max);
@@ -1235,12 +1214,11 @@
information about this type. */
tree
-create_type_decl (type_name, type, attr_list, artificial_p, debug_info_p)
- tree type_name;
- tree type;
- struct attrib *attr_list;
- int artificial_p;
- int debug_info_p;
+create_type_decl (tree type_name,
+ tree type,
+ struct attrib *attr_list,
+ int artificial_p,
+ int debug_info_p)
{
tree type_decl = build_decl (TYPE_DECL, type_name, type);
enum tree_code code = TREE_CODE (type);
@@ -1282,17 +1260,15 @@
it indicates whether to always allocate storage to the variable. */
tree
-create_var_decl (var_name, asm_name, type, var_init, const_flag, public_flag,
- extern_flag, static_flag, attr_list)
- tree var_name;
- tree asm_name;
- tree type;
- tree var_init;
- int const_flag;
- int public_flag;
- int extern_flag;
- int static_flag;
- struct attrib *attr_list;
+create_var_decl (tree var_name,
+ tree asm_name,
+ tree type,
+ tree var_init,
+ int const_flag,
+ int public_flag,
+ int extern_flag,
+ int static_flag,
+ struct attrib *attr_list)
{
int init_const
= (var_init == 0
@@ -1397,14 +1373,13 @@
the address of this field for aliasing purposes. */
tree
-create_field_decl (field_name, field_type, record_type, packed, size, pos,
- addressable)
- tree field_name;
- tree field_type;
- tree record_type;
- int packed;
- tree size, pos;
- int addressable;
+create_field_decl (tree field_name,
+ tree field_type,
+ tree record_type,
+ int packed,
+ tree size,
+ tree pos,
+ int addressable)
{
tree field_decl = build_decl (FIELD_DECL, field_name, field_type);
@@ -1515,8 +1490,7 @@
effects, has the value of zero. */
static int
-value_zerop (exp)
- tree exp;
+value_zerop (tree exp)
{
if (TREE_CODE (exp) == COMPOUND_EXPR)
return value_zerop (TREE_OPERAND (exp, 1));
@@ -1530,10 +1504,7 @@
parameter). */
tree
-create_param_decl (param_name, param_type, readonly)
- tree param_name;
- tree param_type;
- int readonly;
+create_param_decl (tree param_name, tree param_type, int readonly)
{
tree param_decl = build_decl (PARM_DECL, param_name, param_type);
@@ -1570,9 +1541,7 @@
/* Given a DECL and ATTR_LIST, process the listed attributes. */
void
-process_attributes (decl, attr_list)
- tree decl;
- struct attrib *attr_list;
+process_attributes (tree decl, struct attrib *attr_list)
{
for (; attr_list; attr_list = attr_list->next)
switch (attr_list->type)
@@ -1613,9 +1582,7 @@
/* Add some pending elaborations on the list. */
void
-add_pending_elaborations (var_decl, var_init)
- tree var_decl;
- tree var_init;
+add_pending_elaborations (tree var_decl, tree var_init)
{
if (var_init != 0)
Check_Elaboration_Code_Allowed (error_gnat_node);
@@ -1627,7 +1594,7 @@
/* Obtain any pending elaborations and clear the old list. */
tree
-get_pending_elaborations ()
+get_pending_elaborations (void)
{
/* Each thing added to the list went on the end; we want it on the
beginning. */
@@ -1641,9 +1608,7 @@
of 2. */
static int
-value_factor_p (value, factor)
- tree value;
- int factor;
+value_factor_p (tree value, int factor)
{
if (host_integerp (value, 1))
return tree_low_cst (value, 1) % factor == 0;
@@ -1662,10 +1627,7 @@
position of CURR_FIELD. It is ignored if null. */
static int
-potential_alignment_gap (prev_field, curr_field, offset)
- tree prev_field;
- tree curr_field;
- tree offset;
+potential_alignment_gap (tree prev_field, tree curr_field, tree offset)
{
/* If this is the first field of the record, there cannot be any gap */
if (!prev_field)
@@ -1707,7 +1669,7 @@
/* Return nonzero if there are pending elaborations. */
int
-pending_elaborations_p ()
+pending_elaborations_p (void)
{
return TREE_CHAIN (pending_elaborations) != 0;
}
@@ -1716,7 +1678,7 @@
one. */
void
-push_pending_elaborations ()
+push_pending_elaborations (void)
{
struct e_stack *p = (struct e_stack *) ggc_alloc (sizeof (struct e_stack));
@@ -1729,7 +1691,7 @@
/* Pop the stack of pending elaborations. */
void
-pop_pending_elaborations ()
+pop_pending_elaborations (void)
{
struct e_stack *p = elist_stack;
@@ -1741,7 +1703,7 @@
elaborations after that point. */
tree
-get_elaboration_location ()
+get_elaboration_location (void)
{
return tree_last (pending_elaborations);
}
@@ -1750,8 +1712,7 @@
list. */
void
-insert_elaboration_list (elab)
- tree elab;
+insert_elaboration_list (tree elab)
{
tree next = TREE_CHAIN (elab);
@@ -1766,8 +1727,7 @@
/* Returns a LABEL_DECL node for LABEL_NAME. */
tree
-create_label_decl (label_name)
- tree label_name;
+create_label_decl (tree label_name)
{
tree label_decl = build_decl (LABEL_DECL, label_name, void_type_node);
@@ -1787,16 +1747,14 @@
appropriate fields in the FUNCTION_DECL. */
tree
-create_subprog_decl (subprog_name, asm_name, subprog_type, param_decl_list,
- inline_flag, public_flag, extern_flag, attr_list)
- tree subprog_name;
- tree asm_name;
- tree subprog_type;
- tree param_decl_list;
- int inline_flag;
- int public_flag;
- int extern_flag;
- struct attrib *attr_list;
+create_subprog_decl (tree subprog_name,
+ tree asm_name,
+ tree subprog_type,
+ tree param_decl_list,
+ int inline_flag,
+ int public_flag,
+ int extern_flag,
+ struct attrib *attr_list)
{
tree return_type = TREE_TYPE (subprog_type);
tree subprog_decl = build_decl (FUNCTION_DECL, subprog_name, subprog_type);
@@ -1842,8 +1800,7 @@
appearing in the subprogram. */
void
-begin_subprog_body (subprog_decl)
- tree subprog_decl;
+begin_subprog_body (tree subprog_decl)
{
tree param_decl_list;
tree param_decl;
@@ -1905,7 +1862,7 @@
to assembler language output. */
void
-end_subprog_body ()
+end_subprog_body (void)
{
tree decl;
tree cico_list;
@@ -1979,13 +1936,12 @@
ATTRS is nonzero, use that for the function attribute list. */
tree
-builtin_function (name, type, function_code, class, library_name, attrs)
- const char *name;
- tree type;
- int function_code;
- enum built_in_class class;
- const char *library_name;
- tree attrs;
+builtin_function (const char *name,
+ tree type,
+ int function_code,
+ enum built_in_class class,
+ const char *library_name,
+ tree attrs)
{
tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
@@ -2007,9 +1963,7 @@
it is a signed type. */
tree
-gnat_type_for_size (precision, unsignedp)
- unsigned precision;
- int unsignedp;
+gnat_type_for_size (unsigned precision, int unsignedp)
{
tree t;
char type_name[20];
@@ -2038,9 +1992,7 @@
/* Likewise for floating-point types. */
static tree
-float_type_for_size (precision, mode)
- int precision;
- enum machine_mode mode;
+float_type_for_size (int precision, enum machine_mode mode)
{
tree t;
char type_name[20];
@@ -2068,9 +2020,7 @@
an unsigned type; otherwise a signed type is returned. */
tree
-gnat_type_for_mode (mode, unsignedp)
- enum machine_mode mode;
- int unsignedp;
+gnat_type_for_mode (enum machine_mode mode, int unsignedp)
{
if (GET_MODE_CLASS (mode) == MODE_FLOAT)
return float_type_for_size (GET_MODE_BITSIZE (mode), mode);
@@ -2081,8 +2031,7 @@
/* Return the unsigned version of a TYPE_NODE, a scalar type. */
tree
-gnat_unsigned_type (type_node)
- tree type_node;
+gnat_unsigned_type (tree type_node)
{
tree type = gnat_type_for_size (TYPE_PRECISION (type_node), 1);
@@ -2105,8 +2054,7 @@
/* Return the signed version of a TYPE_NODE, a scalar type. */
tree
-gnat_signed_type (type_node)
- tree type_node;
+gnat_signed_type (tree type_node)
{
tree type = gnat_type_for_size (TYPE_PRECISION (type_node), 0);
@@ -2130,9 +2078,7 @@
UNSIGNEDP. */
tree
-gnat_signed_or_unsigned_type (unsignedp, type)
- int unsignedp;
- tree type;
+gnat_signed_or_unsigned_type (int unsignedp, tree type)
{
if (! INTEGRAL_TYPE_P (type) || TREE_UNSIGNED (type) == unsignedp)
return type;
@@ -2145,9 +2091,7 @@
minimum (if ! MAX_P) possible value of the discriminant. */
tree
-max_size (exp, max_p)
- tree exp;
- int max_p;
+max_size (tree exp, int max_p)
{
enum tree_code code = TREE_CODE (exp);
tree type = TREE_TYPE (exp);
@@ -2246,10 +2190,7 @@
Return a constructor for the template. */
tree
-build_template (template_type, array_type, expr)
- tree template_type;
- tree array_type;
- tree expr;
+build_template (tree template_type, tree array_type, tree expr)
{
tree template_elts = NULL_TREE;
tree bound_list = NULL_TREE;
@@ -2318,10 +2259,7 @@
an object of that type and also for the name. */
tree
-build_vms_descriptor (type, mech, gnat_entity)
- tree type;
- Mechanism_Type mech;
- Entity_Id gnat_entity;
+build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity)
{
tree record_type = make_node (RECORD_TYPE);
tree field_list = 0;
@@ -2606,11 +2544,7 @@
/* Utility routine for above code to make a field. */
static tree
-make_descriptor_field (name, type, rec_type, initial)
- const char *name;
- tree type;
- tree rec_type;
- tree initial;
+make_descriptor_field (const char *name, tree type, tree rec_type, tree initial)
{
tree field
= create_field_decl (get_identifier (name), type, rec_type, 0, 0, 0, 0);
@@ -2627,10 +2561,7 @@
as the name of the record. */
tree
-build_unc_object_type (template_type, object_type, name)
- tree template_type;
- tree object_type;
- tree name;
+build_unc_object_type (tree template_type, tree object_type, tree name)
{
tree type = make_node (RECORD_TYPE);
tree template_field = create_field_decl (get_identifier ("BOUNDS"),
@@ -2653,9 +2584,7 @@
if NEW is an UNCONSTRAINED_ARRAY_TYPE. */
void
-update_pointer_to (old_type, new_type)
- tree old_type;
- tree new_type;
+update_pointer_to (tree old_type, tree new_type)
{
tree ptr = TYPE_POINTER_TO (old_type);
tree ref = TYPE_REFERENCE_TO (old_type);
@@ -2792,9 +2721,7 @@
pointer. This involves making or finding a template. */
static tree
-convert_to_fat_pointer (type, expr)
- tree type;
- tree expr;
+convert_to_fat_pointer (tree type, tree expr)
{
tree template_type = TREE_TYPE (TREE_TYPE (TREE_CHAIN (TYPE_FIELDS (type))));
tree template, template_addr;
@@ -2861,9 +2788,7 @@
is not already a fat pointer. */
static tree
-convert_to_thin_pointer (type, expr)
- tree type;
- tree expr;
+convert_to_thin_pointer (tree type, tree expr)
{
if (! TYPE_FAT_POINTER_P (TREE_TYPE (expr)))
expr
@@ -2886,8 +2811,7 @@
not permitted by the language being compiled. */
tree
-convert (type, expr)
- tree type, expr;
+convert (tree type, tree expr)
{
enum tree_code code = TREE_CODE (type);
tree etype = TREE_TYPE (expr);
@@ -3229,9 +3153,7 @@
the address is not bit-aligned. */
tree
-remove_conversions (exp, true_address)
- tree exp;
- int true_address;
+remove_conversions (tree exp, int true_address)
{
switch (TREE_CODE (exp))
{
@@ -3264,8 +3186,7 @@
likewise return an expression pointing to the underlying array. */
tree
-maybe_unconstrained_array (exp)
- tree exp;
+maybe_unconstrained_array (tree exp)
{
enum tree_code code = TREE_CODE (exp);
tree new;
@@ -3327,10 +3248,7 @@
If NOTRUNC_P is set, truncation operations should be suppressed. */
tree
-unchecked_convert (type, expr, notrunc_p)
- tree type;
- tree expr;
- int notrunc_p;
+unchecked_convert (tree type, tree expr, int notrunc_p)
{
tree etype = TREE_TYPE (expr);
diff -u gcc-3.4-20031029/gcc/ada/utils2.c gcc-new/gcc/ada/utils2.c
--- gcc-3.4-20031029/gcc/ada/utils2.c 2003-10-29 05:26:16.000000000 -0500
+++ gcc-new/gcc/ada/utils2.c 2003-10-30 16:08:24.000000000 -0500
@@ -44,13 +44,12 @@
#include "ada-tree.h"
#include "gigi.h"
-static tree find_common_type PARAMS ((tree, tree));
-static int contains_save_expr_p PARAMS ((tree));
-static tree contains_null_expr PARAMS ((tree));
-static tree compare_arrays PARAMS ((tree, tree, tree));
-static tree nonbinary_modular_operation PARAMS ((enum tree_code, tree,
- tree, tree));
-static tree build_simple_component_ref PARAMS ((tree, tree, tree, int));
+static tree find_common_type (tree, tree);
+static int contains_save_expr_p (tree);
+static tree contains_null_expr (tree);
+static tree compare_arrays (tree, tree, tree);
+static tree nonbinary_modular_operation (enum tree_code, tree, tree, tree);
+static tree build_simple_component_ref (tree, tree, tree, int);
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR or other logical
operation.
@@ -68,8 +67,7 @@
the only possible operands will be things of Boolean type. */
tree
-gnat_truthvalue_conversion (expr)
- tree expr;
+gnat_truthvalue_conversion (tree expr)
{
tree type = TREE_TYPE (expr);
@@ -106,8 +104,7 @@
/* Return the base type of TYPE. */
tree
-get_base_type (type)
- tree type;
+get_base_type (tree type)
{
if (TREE_CODE (type) == RECORD_TYPE
&& TYPE_LEFT_JUSTIFIED_MODULAR_P (type))
@@ -123,8 +120,7 @@
/* Likewise, but only return types known to the Ada source. */
tree
-get_ada_base_type (type)
- tree type;
+get_ada_base_type (tree type)
{
while (TREE_TYPE (type) != 0
&& (TREE_CODE (type) == INTEGER_TYPE
@@ -140,8 +136,7 @@
in bits. If we don't know anything about the alignment, return 0. */
unsigned int
-known_alignment (exp)
- tree exp;
+known_alignment (tree exp)
{
unsigned int this_alignment;
unsigned int lhs, rhs;
@@ -221,8 +216,7 @@
Otherwise return zero. */
static tree
-find_common_type (t1, t2)
- tree t1, t2;
+find_common_type (tree t1, tree t2)
{
/* If either type is non-BLKmode, use it. Note that we know that we will
not have any alignment problems since if we did the non-BLKmode
@@ -251,8 +245,7 @@
of some very general solution. */
static int
-contains_save_expr_p (exp)
- tree exp;
+contains_save_expr_p (tree exp)
{
switch (TREE_CODE (exp))
{
@@ -283,8 +276,7 @@
that are known to raise Constraint_Error. */
static tree
-contains_null_expr (exp)
- tree exp;
+contains_null_expr (tree exp)
{
tree tem;
@@ -339,9 +331,7 @@
length tests in as efficient a manner as possible. */
static tree
-compare_arrays (result_type, a1, a2)
- tree a1, a2;
- tree result_type;
+compare_arrays (tree result_type, tree a1, tree a2)
{
tree t1 = TREE_TYPE (a1);
tree t2 = TREE_TYPE (a2);
@@ -501,10 +491,10 @@
modulus. */
static tree
-nonbinary_modular_operation (op_code, type, lhs, rhs)
- enum tree_code op_code;
- tree type;
- tree lhs, rhs;
+nonbinary_modular_operation (enum tree_code op_code,
+ tree type,
+ tree lhs,
+ tree rhs)
{
tree modulus = TYPE_MODULUS (type);
unsigned int needed_precision = tree_floor_log2 (modulus) + 1;
@@ -601,11 +591,10 @@
have to do here is validate the work done by SEM and handle subtypes. */
tree
-build_binary_op (op_code, result_type, left_operand, right_operand)
- enum tree_code op_code;
- tree result_type;
- tree left_operand;
- tree right_operand;
+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 right_type = TREE_TYPE (right_operand);
@@ -1094,10 +1083,7 @@
/* Similar, but for unary operations. */
tree
-build_unary_op (op_code, result_type, operand)
- enum tree_code op_code;
- tree result_type;
- tree operand;
+build_unary_op (enum tree_code op_code, tree result_type, tree operand)
{
tree type = TREE_TYPE (operand);
tree base_type = get_base_type (type);
@@ -1415,11 +1401,10 @@
/* Similar, but for COND_EXPR. */
tree
-build_cond_expr (result_type, condition_operand, true_operand, false_operand)
- tree result_type;
- tree condition_operand;
- tree true_operand;
- tree false_operand;
+build_cond_expr (tree result_type,
+ tree condition_operand,
+ tree true_operand,
+ tree false_operand)
{
tree result;
int addr_p = 0;
@@ -1470,9 +1455,7 @@
the CALL_EXPR. */
tree
-build_call_1_expr (fundecl, arg)
- tree fundecl;
- tree arg;
+build_call_1_expr (tree fundecl, tree arg)
{
tree call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fundecl)),
build_unary_op (ADDR_EXPR, NULL_TREE, fundecl),
@@ -1488,9 +1471,7 @@
the CALL_EXPR. */
tree
-build_call_2_expr (fundecl, arg1, arg2)
- tree fundecl;
- tree arg1, arg2;
+build_call_2_expr (tree fundecl, tree arg1, tree arg2)
{
tree call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fundecl)),
build_unary_op (ADDR_EXPR, NULL_TREE, fundecl),
@@ -1507,8 +1488,7 @@
/* Likewise to call FUNDECL with no arguments. */
tree
-build_call_0_expr (fundecl)
- tree fundecl;
+build_call_0_expr (tree fundecl)
{
tree call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fundecl)),
build_unary_op (ADDR_EXPR, NULL_TREE, fundecl),
@@ -1523,8 +1503,7 @@
name, if requested. MSG says which exception function to call. */
tree
-build_call_raise (msg)
- int msg;
+build_call_raise (int msg)
{
tree fndecl = gnat_raise_decls[msg];
const char *str = discard_file_names ? "" : ref_filename;
@@ -1545,9 +1524,7 @@
/* Return a CONSTRUCTOR of TYPE whose list is LIST. */
tree
-gnat_build_constructor (type, list)
- tree type;
- tree list;
+gnat_build_constructor (tree type, tree list)
{
tree elmt;
int allconstant = (TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST);
@@ -1616,11 +1593,10 @@
actual record and know how to look for fields in variant parts. */
static tree
-build_simple_component_ref (record_variable, component, field, no_fold_p)
- tree record_variable;
- tree component;
- tree field;
- int no_fold_p;
+build_simple_component_ref (tree record_variable,
+ tree component,
+ tree field,
+ int no_fold_p)
{
tree record_type = TYPE_MAIN_VARIANT (TREE_TYPE (record_variable));
tree ref;
@@ -1707,11 +1683,10 @@
reference could not be found. */
tree
-build_component_ref (record_variable, component, field, no_fold_p)
- tree record_variable;
- tree component;
- tree field;
- int no_fold_p;
+build_component_ref (tree record_variable,
+ tree component,
+ tree field,
+ int no_fold_p)
{
tree ref = build_simple_component_ref (record_variable, component, field,
no_fold_p);
@@ -1741,14 +1716,12 @@
object dynamically on the stack frame. */
tree
-build_call_alloc_dealloc
- (gnu_obj, gnu_size, align, gnat_proc, gnat_pool, gnat_node)
- tree gnu_obj;
- tree gnu_size;
- int align;
- Entity_Id gnat_proc;
- Entity_Id gnat_pool;
- Node_Id gnat_node;
+build_call_alloc_dealloc (tree gnu_obj,
+ tree gnu_size,
+ int align,
+ Entity_Id gnat_proc,
+ Entity_Id gnat_pool,
+ Node_Id gnat_node)
{
tree gnu_align = size_int (align / BITS_PER_UNIT);
@@ -1865,13 +1838,12 @@
the storage pool to use. */
tree
-build_allocator (type, init, result_type, gnat_proc, gnat_pool, gnat_node)
- tree type;
- tree init;
- tree result_type;
- Entity_Id gnat_proc;
- Entity_Id gnat_pool;
- Node_Id gnat_node;
+build_allocator (tree type,
+ tree init,
+ tree result_type,
+ Entity_Id gnat_proc,
+ Entity_Id gnat_pool,
+ Node_Id gnat_node)
{
tree size = TYPE_SIZE_UNIT (type);
tree result;
@@ -2030,9 +2002,7 @@
GNAT_FORMAL is how we find the descriptor record. */
tree
-fill_vms_descriptor (expr, gnat_formal)
- tree expr;
- Entity_Id gnat_formal;
+fill_vms_descriptor (tree expr, Entity_Id gnat_formal)
{
tree record_type = TREE_TYPE (TREE_TYPE (get_gnu_tree (gnat_formal)));
tree field;
@@ -2059,8 +2029,7 @@
should not be allocated in a register. Returns true if successful. */
bool
-gnat_mark_addressable (expr_node)
- tree expr_node;
+gnat_mark_addressable (tree expr_node)
{
while (1)
switch (TREE_CODE (expr_node))