Commit 9373164a by R. Kelley Cook

C90 prototype updates.

From-SVN: r73113
parent 6587cd2b
2003-10-30 Kelley Cook <kcook@gcc.gnu.org>
* value-prof.c, web.c: Update to C90.
2003-10-30 Eric Christopher <echristo@redhat.com>
* function.c (purge_addressof_1): Add case for REG_RETVAL
......@@ -16,7 +20,8 @@
* real.c (encode_ieee_extended): Initialize whole array.
* reg-stack.c (move_for_stack_reg0: Use always XFmode.
* i386-modes.def: Change definitions of TFmode and XFmode.
* i386.c (classify_argument): Rename TFmodes to XFmodes; add new TFmode code.
* i386.c (classify_argument): Rename TFmodes to XFmodes; add new TFmode
code.
(construct_container): Allow constructing of TFmode integer containers.
(ix86_return_in_memory): XFmode is not returned in memory.
(init_ext_80387_constants): Always use XFmode.
......
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.
2003-10-30 Vasiliy Fofanov <fofanov@act-europe.fr>
* 3vtrasym.adb:
......
......@@ -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 @@ static int verbose_info;
/* 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 @@ static void add_verbose (text, ada_name)
/* 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 @@ has_prefix (name, prefix)
/* 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 @@ ostrcpy (char *s1, char *s2)
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 @@ __gnat_decode (coded_name, ada_name, verbose)
}
char *
ada_demangle (coded_name)
const char *coded_name;
ada_demangle (const char *coded_name)
{
char ada_name[2048];
......
......@@ -425,7 +425,7 @@ __gnat_try_lock (char *dir, char *file)
/* 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 @@ __gnat_get_maximum_file_name_length ()
/* 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 @@ __gnat_get_file_names_case_sensitive ()
}
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 @@ __gnat_readdir (DIR *dirp, char *buffer)
/* 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 @@ __gnat_set_env_value (char *name, char *value)
key. */
char *
__gnat_get_libraries_from_registry ()
__gnat_get_libraries_from_registry (void)
{
char *result = (char *) "";
......@@ -2299,13 +2299,13 @@ __gnat_to_canonical_file_list_init
}
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 @@ __gnat_to_host_file_spec (char *filespec)
}
void
__gnat_adjust_os_resource_limits ()
__gnat_adjust_os_resource_limits (void)
{
}
......@@ -2458,9 +2458,8 @@ extern void __gnat_install_locks (void (*) (void), void (*) (void));
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);
......
......@@ -71,28 +71,25 @@ const char **gnat_envp = (const char **) 0;
#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 @@ __gnat_env_count ()
}
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]));
}
......@@ -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 @@ c_stderr ()
#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);
}
......@@ -94,7 +94,7 @@ __gnat_duration_to_timeval (long sec, long usec, struct timeval *t)
what time_t is on the target. */
long
gnat_time ()
gnat_time (void)
{
return time (0);
}
......@@ -52,7 +52,7 @@
#endif
int
get_char ()
get_char (void)
{
#ifdef VMS
return decc$getchar();
......@@ -62,7 +62,7 @@ get_char ()
}
int
get_int ()
get_int (void)
{
int x;
......@@ -71,8 +71,7 @@ get_int ()
}
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 @@ put_int (x)
}
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 @@ put_char_stderr (c)
#ifdef __vxworks
char *
mktemp (template)
char *template;
mktemp (char *template)
{
return tmpnam (NULL);
}
......
......@@ -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;
......
......@@ -132,7 +132,7 @@ __gnat_install_int_handler (void (*proc) (void))
}
void
__gnat_uninstall_int_handler ()
__gnat_uninstall_int_handler (void)
{
if (sigint_intercepted != NULL)
SetConsoleCtrlHandler (__gnat_int_handler, FALSE);
......@@ -150,7 +150,7 @@ __gnat_install_int_handler (void (*proc) (void) __attribute__ ((unused)))
}
void
__gnat_uninstall_int_handler ()
__gnat_uninstall_int_handler (void)
{
}
#endif
......@@ -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;
......
......@@ -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;
}
......@@ -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;
}
......@@ -72,7 +72,7 @@ __gnat_kill (int pid, int sig)
}
int
__gnat_expect_fork ()
__gnat_expect_fork (void)
{
return 0;
}
......@@ -159,7 +159,7 @@ __gnat_pipe (int *fd)
}
int
__gnat_expect_fork ()
__gnat_expect_fork (void)
{
return -1;
}
......@@ -299,7 +299,7 @@ __gnat_pipe (int *fd)
}
int
__gnat_expect_fork ()
__gnat_expect_fork (void)
{
return fork ();
}
......@@ -406,7 +406,7 @@ __gnat_pipe (int *fd)
}
int
__gnat_expect_fork ()
__gnat_expect_fork (void)
{
return -1;
}
......
......@@ -38,6 +38,6 @@ extern void __gnat_finalize (void);
where finalization is required. */
void
__gnat_finalize ()
__gnat_finalize (void)
{
}
......@@ -75,7 +75,7 @@ convert_addresses (char *addrs[], int n_addr, void *buf, int *len);
*/
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 @@ void __gnat_gmem_a2l_initialize (char *exename)
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;
......
......@@ -72,12 +72,11 @@ char *gcc_B_arg = 0;
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 @@ addarg (str)
}
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 @@ process_args (p_argc, argv)
}
}
}
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;
......
......@@ -359,7 +359,7 @@ gnat_tree_size (enum tree_code code)
/* 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 @@ gnat_finish_incomplete_decl (tree dont_care ATTRIBUTE_UNUSED)
objects. */
void
gnat_compute_largest_alignment ()
gnat_compute_largest_alignment (void)
{
enum machine_mode mode;
......@@ -413,7 +413,7 @@ gnat_compute_largest_alignment ()
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
......
......@@ -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);
......
......@@ -58,9 +58,7 @@ typedef char bool;
/* 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 @@ _gnat_builtin_longjmp (ptr, flag)
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_Context _Unwind_Context;
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 @@ typedef struct
} 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 @@ db_region_for (region, uw_context)
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 @@ get_ttype_entry_for (region, filter)
/* 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 @@ typedef struct
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 @@ db_action_for (action, uw_context)
#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 @@ get_call_site_action_for (uw_context, region, action)
/* ! __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 @@ get_call_site_action_for (uw_context, region, action)
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 @@ get_action_description_for (uw_context, uw_exception, region, action)
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 @@ setup_to_install (uw_context, uw_exception, uw_landing_pad, uw_filter)
/* 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 @@ __gnat_eh_personality (uw_version, uw_phases,
#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 @@ __gnat_Unwind_RaiseException (e)
#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 @@ __gnat_Unwind_ForcedUnwind (e, handler, argument)
#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 @@ __gnat_Unwind_ForcedUnwind (e, handler, argument)
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 ();
}
......
......@@ -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 @@ __gnat_free_socket_set (set)
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 @@ __gnat_last_socket_in_set (set, last)
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 @@ __gnat_get_socket_from_set (set, last, socket)
/* 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 @@ __gnat_insert_socket_in_set (set, socket)
/* 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 @@ __gnat_is_socket_in_set (set, socket)
/* 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 @@ __gnat_new_socket_set (set)
/* 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);
}
......@@ -157,15 +157,13 @@ static const char *mode_append_binary_plus = "a+b";
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 @@ __gnat_set_text_mode (handle)
"console". */
char *
__gnat_ttyname (filedes)
int filedes;
__gnat_ttyname (int filedes)
{
if (isatty (filedes))
return "console";
......@@ -206,22 +203,22 @@ __gnat_ttyname (filedes)
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 @@ winflush_init ()
}
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 @@ const char __gnat_text_translation_required = 0;
/* 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 @@ static int initted = 0;
/* 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 @@ getc_immediate (stream, ch, end_of_file)
/* 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 @@ getc_immediate_nowait (stream, ch, end_of_file, avail)
/* 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 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting)
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 @@ rts_get_nShowCmd ()
#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 @@ get_gmtoff ()
#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 @@ __gnat_localtime_r (timer, tp)
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 @@ __gnat_localtime_r (timer, tp)
/* 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);
}
......
......@@ -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 @@ get_target_no_dollar_in_label ()
#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;
}
......@@ -207,12 +207,11 @@ typedef struct {
********************/
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;
......
......@@ -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
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 @@ trace_alloc (n)
}
static void
free_trace_alloc ()
free_trace_alloc (void)
{
while (trace_alloc_chain != 0)
{
......@@ -285,9 +284,7 @@ free_trace_alloc ()
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 @@ read_memory_safe4 (addr, dest)
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 @@ read_register (regno)
}
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 @@ inside_entry_file (addr)
}
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 @@ alpha_saved_pc_after_call (frame)
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 @@ alpha_find_saved_regs (frame)
}
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 @@ read_next_frame_reg (fi, regno)
}
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 @@ static struct alpha_extra_func_info temp_proc_desc;
$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 @@ alpha_about_to_return (pc)
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 @@ heuristic_proc_start (pc)
}
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 @@ heuristic_proc_desc (start_pc, limit_pc, next_frame, saved_regs_p)
}
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 @@ find_proc_desc (pc, next_frame, saved_regs)
}
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 @@ alpha_frame_chain (frame)
}
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 @@ init_extra_frame_info (frame)
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 @@ create_new_frame (addr, pc)
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 @@ get_current_frame ()
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 @@ get_prev_frame (next_frame)
"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;
......
......@@ -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 @@ extern int __gnat_backtrace PARAMS ((void **, int, void *, void *, int));
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 @@ static void forced_callee () {}
#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;
......
......@@ -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 @@ static tree build_simple_component_ref PARAMS ((tree, tree, tree, int));
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 @@ gnat_truthvalue_conversion (expr)
/* 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 @@ get_base_type (type)
/* 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 @@ get_ada_base_type (type)
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 @@ known_alignment (exp)
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 @@ find_common_type (t1, t2)
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 @@ contains_save_expr_p (exp)
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 @@ contains_null_expr (exp)
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 @@ compare_arrays (result_type, a1, a2)
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 @@ nonbinary_modular_operation (op_code, type, lhs, rhs)
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 @@ build_binary_op (op_code, result_type, left_operand, right_operand)
/* 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 @@ build_unary_op (op_code, result_type, operand)
/* 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 @@ build_cond_expr (result_type, condition_operand, true_operand, false_operand)
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 @@ build_call_1_expr (fundecl, arg)
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 @@ build_call_2_expr (fundecl, arg1, arg2)
/* 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 @@ build_call_0_expr (fundecl)
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 @@ build_call_raise (msg)
/* 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 @@ gnat_build_constructor (type, list)
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 @@ build_simple_component_ref (record_variable, component, field, no_fold_p)
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 @@ build_component_ref (record_variable, component, field, no_fold_p)
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 @@ build_call_alloc_dealloc
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 @@ build_allocator (type, init, result_type, gnat_proc, gnat_pool, gnat_node)
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 @@ fill_vms_descriptor (expr, gnat_formal)
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))
......
......@@ -314,7 +314,7 @@ find_values_to_profile (unsigned *n_values, struct histogram_value **values)
we would have to be very careful here. */
bool
value_profile_transformations ()
value_profile_transformations (void)
{
rtx insn, next;
int changed = false;
......
......@@ -66,22 +66,18 @@ struct web_entry
rtx reg;
};
static struct web_entry *unionfind_root PARAMS ((struct web_entry *));
static void unionfind_union PARAMS ((struct web_entry *,
struct web_entry *));
static void union_defs PARAMS ((struct df *, struct ref *,
struct web_entry *,
struct web_entry *));
static rtx entry_register PARAMS ((struct web_entry *,
struct ref *, char *, char *));
static void replace_ref PARAMS ((struct ref *, rtx));
static int mark_addressof PARAMS ((rtx *, void *));
static struct web_entry *unionfind_root (struct web_entry *);
static void unionfind_union (struct web_entry *, struct web_entry *);
static void union_defs (struct df *, struct ref *, struct web_entry *,
struct web_entry *);
static rtx entry_register (struct web_entry *, struct ref *, char *, char *);
static void replace_ref (struct ref *, rtx);
static int mark_addressof (rtx *, void *);
/* Find the root of unionfind tree (the representative of set). */
static struct web_entry *
unionfind_root (element)
struct web_entry *element;
unionfind_root (struct web_entry *element)
{
struct web_entry *element1 = element, *element2;
......@@ -99,8 +95,7 @@ unionfind_root (element)
/* Union sets. */
static void
unionfind_union (first, second)
struct web_entry *first, *second;
unionfind_union (struct web_entry *first, struct web_entry *second)
{
first = unionfind_root (first);
second = unionfind_root (second);
......@@ -113,11 +108,8 @@ unionfind_union (first, second)
register, union them. */
static void
union_defs (df, use, def_entry, use_entry)
struct df *df;
struct ref *use;
struct web_entry *def_entry;
struct web_entry *use_entry;
union_defs (struct df *df, struct ref *use, struct web_entry *def_entry,
struct web_entry *use_entry)
{
rtx insn = DF_REF_INSN (use);
struct df_link *link = DF_REF_CHAIN (use);
......@@ -179,11 +171,8 @@ union_defs (df, use, def_entry, use_entry)
/* Find the corresponding register for the given entry. */
static rtx
entry_register (entry, ref, used, use_addressof)
struct web_entry *entry;
struct ref *ref;
char *used;
char *use_addressof;
entry_register (struct web_entry *entry, struct ref *ref, char *used,
char *use_addressof)
{
struct web_entry *root;
rtx reg, newreg;
......@@ -235,9 +224,7 @@ entry_register (entry, ref, used, use_addressof)
/* Replace the reference by REG. */
static void
replace_ref (ref, reg)
struct ref *ref;
rtx reg;
replace_ref (struct ref *ref, rtx reg)
{
rtx oldreg = DF_REF_REAL_REG (ref);
rtx *loc = DF_REF_REAL_LOC (ref);
......@@ -253,9 +240,7 @@ replace_ref (ref, reg)
/* Mark each pseudo whose address is taken. */
static int
mark_addressof (rtl, data)
rtx *rtl;
void *data;
mark_addressof (rtx *rtl, void *data)
{
if (!*rtl)
return 0;
......@@ -268,7 +253,7 @@ mark_addressof (rtl, data)
/* Main entry point. */
void
web_main ()
web_main (void)
{
struct df *df;
struct web_entry *def_entry;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment