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> 2003-10-30 Eric Christopher <echristo@redhat.com>
* function.c (purge_addressof_1): Add case for REG_RETVAL * function.c (purge_addressof_1): Add case for REG_RETVAL
...@@ -16,7 +20,8 @@ ...@@ -16,7 +20,8 @@
* real.c (encode_ieee_extended): Initialize whole array. * real.c (encode_ieee_extended): Initialize whole array.
* reg-stack.c (move_for_stack_reg0: Use always XFmode. * reg-stack.c (move_for_stack_reg0: Use always XFmode.
* i386-modes.def: Change definitions of TFmode and 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. (construct_container): Allow constructing of TFmode integer containers.
(ix86_return_in_memory): XFmode is not returned in memory. (ix86_return_in_memory): XFmode is not returned in memory.
(init_ext_80387_constants): Always use XFmode. (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> 2003-10-30 Vasiliy Fofanov <fofanov@act-europe.fr>
* 3vtrasym.adb: * 3vtrasym.adb:
......
...@@ -41,9 +41,9 @@ ...@@ -41,9 +41,9 @@
#include "ctype.h" #include "ctype.h"
#include "adadecode.h" #include "adadecode.h"
static void add_verbose PARAMS ((const char *, char *)); static void add_verbose (const char *, char *);
static int has_prefix PARAMS ((const char *, const char *)); static int has_prefix (const char *, const char *);
static int has_suffix PARAMS ((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 /* This is a safe version of strcpy that can be used with overlapped
pointers. Does nothing if s2 <= s1. */ pointers. Does nothing if s2 <= s1. */
...@@ -55,9 +55,7 @@ static int verbose_info; ...@@ -55,9 +55,7 @@ static int verbose_info;
/* Add TEXT to end of ADA_NAME, putting a leading " (" or ", ", depending /* Add TEXT to end of ADA_NAME, putting a leading " (" or ", ", depending
on VERBOSE_INFO. */ on VERBOSE_INFO. */
static void add_verbose (text, ada_name) static void add_verbose (const char *text, char *ada_name)
const char *text;
char *ada_name;
{ {
strcat (ada_name, verbose_info ? ", " : " ("); strcat (ada_name, verbose_info ? ", " : " (");
strcat (ada_name, text); strcat (ada_name, text);
...@@ -68,9 +66,7 @@ static void add_verbose (text, ada_name) ...@@ -68,9 +66,7 @@ static void add_verbose (text, ada_name)
/* Returns 1 if NAME starts with PREFIX. */ /* Returns 1 if NAME starts with PREFIX. */
static int static int
has_prefix (name, prefix) has_prefix (const char *name, const char *prefix)
const char *name;
const char *prefix;
{ {
return strncmp (name, prefix, strlen (prefix)) == 0; return strncmp (name, prefix, strlen (prefix)) == 0;
} }
...@@ -78,9 +74,7 @@ has_prefix (name, prefix) ...@@ -78,9 +74,7 @@ has_prefix (name, prefix)
/* Returns 1 if NAME ends with SUFFIX. */ /* Returns 1 if NAME ends with SUFFIX. */
static int static int
has_suffix (name, suffix) has_suffix (const char *name, const char *suffix)
const char *name;
const char *suffix;
{ {
int nlen = strlen (name); int nlen = strlen (name);
int slen = strlen (suffix); int slen = strlen (suffix);
...@@ -147,10 +141,7 @@ ostrcpy (char *s1, char *s2) ...@@ -147,10 +141,7 @@ ostrcpy (char *s1, char *s2)
x__Oexpon "**" */ x__Oexpon "**" */
void void
__gnat_decode (coded_name, ada_name, verbose) __gnat_decode (const char *coded_name, char *ada_name, int verbose)
const char *coded_name;
char *ada_name;
int verbose;
{ {
int lib_subprog = 0; int lib_subprog = 0;
int overloaded = 0; int overloaded = 0;
...@@ -322,8 +313,7 @@ __gnat_decode (coded_name, ada_name, verbose) ...@@ -322,8 +313,7 @@ __gnat_decode (coded_name, ada_name, verbose)
} }
char * char *
ada_demangle (coded_name) ada_demangle (const char *coded_name)
const char *coded_name;
{ {
char ada_name[2048]; char ada_name[2048];
......
...@@ -425,7 +425,7 @@ __gnat_try_lock (char *dir, char *file) ...@@ -425,7 +425,7 @@ __gnat_try_lock (char *dir, char *file)
/* Return the maximum file name length. */ /* Return the maximum file name length. */
int int
__gnat_get_maximum_file_name_length () __gnat_get_maximum_file_name_length (void)
{ {
#if defined (MSDOS) #if defined (MSDOS)
return 8; return 8;
...@@ -442,7 +442,7 @@ __gnat_get_maximum_file_name_length () ...@@ -442,7 +442,7 @@ __gnat_get_maximum_file_name_length ()
/* Return nonzero if file names are case sensitive. */ /* Return nonzero if file names are case sensitive. */
int int
__gnat_get_file_names_case_sensitive () __gnat_get_file_names_case_sensitive (void)
{ {
#if defined (__EMX__) || defined (MSDOS) || defined (VMS) || defined (WINNT) #if defined (__EMX__) || defined (MSDOS) || defined (VMS) || defined (WINNT)
return 0; return 0;
...@@ -452,7 +452,7 @@ __gnat_get_file_names_case_sensitive () ...@@ -452,7 +452,7 @@ __gnat_get_file_names_case_sensitive ()
} }
char char
__gnat_get_default_identifier_character_set () __gnat_get_default_identifier_character_set (void)
{ {
#if defined (__EMX__) || defined (MSDOS) #if defined (__EMX__) || defined (MSDOS)
return 'p'; return 'p';
...@@ -782,7 +782,7 @@ __gnat_readdir (DIR *dirp, char *buffer) ...@@ -782,7 +782,7 @@ __gnat_readdir (DIR *dirp, char *buffer)
/* Returns 1 if readdir is thread safe, 0 otherwise. */ /* Returns 1 if readdir is thread safe, 0 otherwise. */
int int
__gnat_readdir_is_thread_safe () __gnat_readdir_is_thread_safe (void)
{ {
#ifdef HAVE_READDIR_R #ifdef HAVE_READDIR_R
return 1; return 1;
...@@ -1270,7 +1270,7 @@ __gnat_set_env_value (char *name, char *value) ...@@ -1270,7 +1270,7 @@ __gnat_set_env_value (char *name, char *value)
key. */ key. */
char * char *
__gnat_get_libraries_from_registry () __gnat_get_libraries_from_registry (void)
{ {
char *result = (char *) ""; char *result = (char *) "";
...@@ -2299,13 +2299,13 @@ __gnat_to_canonical_file_list_init ...@@ -2299,13 +2299,13 @@ __gnat_to_canonical_file_list_init
} }
char * char *
__gnat_to_canonical_file_list_next () __gnat_to_canonical_file_list_next (void)
{ {
return (char *) ""; return (char *) "";
} }
void 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) ...@@ -2340,7 +2340,7 @@ __gnat_to_host_file_spec (char *filespec)
} }
void 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)); ...@@ -2458,9 +2458,8 @@ extern void __gnat_install_locks (void (*) (void), void (*) (void));
locking subprograms for libgcc_eh. */ locking subprograms for libgcc_eh. */
void void
__gnatlib_install_locks (lock, unlock) __gnatlib_install_locks (void (*lock) (void) ATTRIBUTE_UNUSED,
void (*lock) (void) ATTRIBUTE_UNUSED; void (*unlock) (void) ATTRIBUTE_UNUSED)
void (*unlock) (void) ATTRIBUTE_UNUSED;
{ {
#ifdef IN_RTS #ifdef IN_RTS
__gnat_install_locks (lock, unlock); __gnat_install_locks (lock, unlock);
......
...@@ -71,28 +71,25 @@ const char **gnat_envp = (const char **) 0; ...@@ -71,28 +71,25 @@ const char **gnat_envp = (const char **) 0;
#endif #endif
int int
__gnat_arg_count () __gnat_arg_count (void)
{ {
return gnat_argc; return gnat_argc;
} }
int int
__gnat_len_arg (arg_num) __gnat_len_arg (int arg_num)
int arg_num;
{ {
return strlen (gnat_argv[arg_num]); return strlen (gnat_argv[arg_num]);
} }
void void
__gnat_fill_arg (a, i) __gnat_fill_arg ( char *a, int i)
char *a;
int i;
{ {
strncpy (a, gnat_argv[i], strlen(gnat_argv[i])); strncpy (a, gnat_argv[i], strlen(gnat_argv[i]));
} }
int int
__gnat_env_count () __gnat_env_count (void)
{ {
int i; int i;
...@@ -102,16 +99,13 @@ __gnat_env_count () ...@@ -102,16 +99,13 @@ __gnat_env_count ()
} }
int int
__gnat_len_env (env_num) __gnat_len_env (int env_num)
int env_num;
{ {
return strlen (gnat_envp[env_num]); return strlen (gnat_envp[env_num]);
} }
void void
__gnat_fill_env (a, i) __gnat_fill_env (char *a, int i)
char *a;
int i;
{ {
strncpy (a, gnat_envp[i], strlen (gnat_envp[i])); strncpy (a, gnat_envp[i], strlen (gnat_envp[i]));
} }
...@@ -43,28 +43,28 @@ ...@@ -43,28 +43,28 @@
/* Function wrappers are needed to access the values from Ada which are /* Function wrappers are needed to access the values from Ada which are
defined as C macros. */ defined as C macros. */
FILE *c_stdin PARAMS ((void)); FILE *c_stdin (void);
FILE *c_stdout PARAMS ((void)); FILE *c_stdout (void);
FILE *c_stderr PARAMS ((void)); FILE *c_stderr (void);
int seek_set_function PARAMS ((void)); int seek_set_function (void);
int seek_end_function PARAMS ((void)); int seek_end_function (void);
void *null_function PARAMS ((void)); void *null_function (void);
int c_fileno PARAMS ((FILE *)); int c_fileno (FILE *);
FILE * FILE *
c_stdin () c_stdin (void)
{ {
return stdin; return stdin;
} }
FILE * FILE *
c_stdout () c_stdout (void)
{ {
return stdout; return stdout;
} }
FILE * FILE *
c_stderr () c_stderr (void)
{ {
return stderr; return stderr;
} }
...@@ -76,25 +76,24 @@ c_stderr () ...@@ -76,25 +76,24 @@ c_stderr ()
#endif #endif
int int
seek_set_function () seek_set_function (void)
{ {
return SEEK_SET; return SEEK_SET;
} }
int int
seek_end_function () seek_end_function (void)
{ {
return SEEK_END; return SEEK_END;
} }
void *null_function () void *null_function (void)
{ {
return NULL; return NULL;
} }
int int
c_fileno (s) c_fileno (FILE *s)
FILE *s;
{ {
return fileno (s); return fileno (s);
} }
...@@ -94,7 +94,7 @@ __gnat_duration_to_timeval (long sec, long usec, struct timeval *t) ...@@ -94,7 +94,7 @@ __gnat_duration_to_timeval (long sec, long usec, struct timeval *t)
what time_t is on the target. */ what time_t is on the target. */
long long
gnat_time () gnat_time (void)
{ {
return time (0); return time (0);
} }
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
#endif #endif
int int
get_char () get_char (void)
{ {
#ifdef VMS #ifdef VMS
return decc$getchar(); return decc$getchar();
...@@ -62,7 +62,7 @@ get_char () ...@@ -62,7 +62,7 @@ get_char ()
} }
int int
get_int () get_int (void)
{ {
int x; int x;
...@@ -71,8 +71,7 @@ get_int () ...@@ -71,8 +71,7 @@ get_int ()
} }
void void
put_int (x) put_int (int x)
int x;
{ {
/* Use fprintf rather than printf, since the latter is unbuffered /* Use fprintf rather than printf, since the latter is unbuffered
on vxworks */ on vxworks */
...@@ -80,22 +79,19 @@ put_int (x) ...@@ -80,22 +79,19 @@ put_int (x)
} }
void void
put_int_stderr (x) put_int_stderr (int x)
int x;
{ {
fprintf (stderr, "%d", x); fprintf (stderr, "%d", x);
} }
void void
put_char (c) put_char (int c)
int c;
{ {
putchar (c); putchar (c);
} }
void void
put_char_stderr (c) put_char_stderr (int c)
int c;
{ {
fputc (c, stderr); fputc (c, stderr);
} }
...@@ -103,8 +99,7 @@ put_char_stderr (c) ...@@ -103,8 +99,7 @@ put_char_stderr (c)
#ifdef __vxworks #ifdef __vxworks
char * char *
mktemp (template) mktemp (char *template)
char *template;
{ {
return tmpnam (NULL); return tmpnam (NULL);
} }
......
...@@ -76,29 +76,25 @@ ...@@ -76,29 +76,25 @@
#endif #endif
int int
__gnat_feof (stream) __gnat_feof (FILE *stream)
FILE *stream;
{ {
return (feof (stream)); return (feof (stream));
} }
int int
__gnat_ferror (stream) __gnat_ferror (FILE *stream)
FILE *stream;
{ {
return (ferror (stream)); return (ferror (stream));
} }
int int
__gnat_fileno (stream) __gnat_fileno (FILE *stream)
FILE *stream;
{ {
return (fileno (stream)); return (fileno (stream));
} }
int int
__gnat_is_regular_file_fd (fd) __gnat_is_regular_file_fd (int fd)
int fd;
{ {
int ret; int ret;
struct stat statbuf; struct stat statbuf;
......
...@@ -132,7 +132,7 @@ __gnat_install_int_handler (void (*proc) (void)) ...@@ -132,7 +132,7 @@ __gnat_install_int_handler (void (*proc) (void))
} }
void void
__gnat_uninstall_int_handler () __gnat_uninstall_int_handler (void)
{ {
if (sigint_intercepted != NULL) if (sigint_intercepted != NULL)
SetConsoleCtrlHandler (__gnat_int_handler, FALSE); SetConsoleCtrlHandler (__gnat_int_handler, FALSE);
...@@ -150,7 +150,7 @@ __gnat_install_int_handler (void (*proc) (void) __attribute__ ((unused))) ...@@ -150,7 +150,7 @@ __gnat_install_int_handler (void (*proc) (void) __attribute__ ((unused)))
} }
void void
__gnat_uninstall_int_handler () __gnat_uninstall_int_handler (void)
{ {
} }
#endif #endif
...@@ -57,9 +57,7 @@ ...@@ -57,9 +57,7 @@
resulting node. */ resulting node. */
tree tree
UI_To_gnu (Input, type) UI_To_gnu (Uint Input, tree type)
Uint Input;
tree type;
{ {
tree gnu_ret; tree gnu_ret;
......
...@@ -42,14 +42,13 @@ ...@@ -42,14 +42,13 @@
#include <errno.h> #include <errno.h>
int int
__get_errno() __get_errno(void)
{ {
return errno; return errno;
} }
void void
__set_errno(err) __set_errno(int err)
int err;
{ {
errno = err; errno = err;
} }
...@@ -50,8 +50,7 @@ ...@@ -50,8 +50,7 @@
int gnat_exit_status = 0; int gnat_exit_status = 0;
void void
__gnat_set_exit_status (i) __gnat_set_exit_status (int i)
int i;
{ {
gnat_exit_status = i; gnat_exit_status = i;
} }
...@@ -72,7 +72,7 @@ __gnat_kill (int pid, int sig) ...@@ -72,7 +72,7 @@ __gnat_kill (int pid, int sig)
} }
int int
__gnat_expect_fork () __gnat_expect_fork (void)
{ {
return 0; return 0;
} }
...@@ -159,7 +159,7 @@ __gnat_pipe (int *fd) ...@@ -159,7 +159,7 @@ __gnat_pipe (int *fd)
} }
int int
__gnat_expect_fork () __gnat_expect_fork (void)
{ {
return -1; return -1;
} }
...@@ -299,7 +299,7 @@ __gnat_pipe (int *fd) ...@@ -299,7 +299,7 @@ __gnat_pipe (int *fd)
} }
int int
__gnat_expect_fork () __gnat_expect_fork (void)
{ {
return fork (); return fork ();
} }
...@@ -406,7 +406,7 @@ __gnat_pipe (int *fd) ...@@ -406,7 +406,7 @@ __gnat_pipe (int *fd)
} }
int int
__gnat_expect_fork () __gnat_expect_fork (void)
{ {
return -1; return -1;
} }
......
...@@ -38,6 +38,6 @@ extern void __gnat_finalize (void); ...@@ -38,6 +38,6 @@ extern void __gnat_finalize (void);
where finalization is required. */ where finalization is required. */
void void
__gnat_finalize () __gnat_finalize (void)
{ {
} }
...@@ -75,7 +75,7 @@ convert_addresses (char *addrs[], int n_addr, void *buf, int *len); ...@@ -75,7 +75,7 @@ convert_addresses (char *addrs[], int n_addr, void *buf, int *len);
*/ */
static void static void
gmem_read_backtrace () gmem_read_backtrace (void)
{ {
fread (&cur_tb_len, sizeof (int), 1, gmemfile); fread (&cur_tb_len, sizeof (int), 1, gmemfile);
fread (tracebk, sizeof (char *), cur_tb_len, gmemfile); fread (tracebk, sizeof (char *), cur_tb_len, gmemfile);
...@@ -120,8 +120,7 @@ void __gnat_gmem_a2l_initialize (char *exename) ...@@ -120,8 +120,7 @@ void __gnat_gmem_a2l_initialize (char *exename)
write an alloc/free information in buf to be processed by gnatmem */ write an alloc/free information in buf to be processed by gnatmem */
void void
__gnat_gmem_read_next (buf) __gnat_gmem_read_next (struct struct_storage_elmt *buf)
struct struct_storage_elmt *buf;
{ {
void *addr; void *addr;
size_t size; size_t size;
......
...@@ -72,12 +72,11 @@ char *gcc_B_arg = 0; ...@@ -72,12 +72,11 @@ char *gcc_B_arg = 0;
static int linkonly = 0; static int linkonly = 0;
static void addarg PARAMS ((char *)); static void addarg (char *);
static void process_args PARAMS ((int *, char *[])); static void process_args (int *, char *[]);
static void static void
addarg (str) addarg (char *str)
char *str;
{ {
int i; int i;
...@@ -100,9 +99,7 @@ addarg (str) ...@@ -100,9 +99,7 @@ addarg (str)
} }
static void static void
process_args (p_argc, argv) process_args (int *p_argc, char *argv[])
int *p_argc;
char *argv[];
{ {
int i, j; int i, j;
...@@ -199,12 +196,10 @@ process_args (p_argc, argv) ...@@ -199,12 +196,10 @@ process_args (p_argc, argv)
} }
} }
} }
extern int main PARAMS ((int, char **)); extern int main (int, char **);
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
int i, j; int i, j;
int done_an_ali = 0; int done_an_ali = 0;
......
...@@ -359,7 +359,7 @@ gnat_tree_size (enum tree_code code) ...@@ -359,7 +359,7 @@ gnat_tree_size (enum tree_code code)
/* Perform all the initialization steps that are language-specific. */ /* Perform all the initialization steps that are language-specific. */
static bool static bool
gnat_init () gnat_init (void)
{ {
/* Performs whatever initialization steps needed by the language-dependent /* Performs whatever initialization steps needed by the language-dependent
lexical analyzer. */ lexical analyzer. */
...@@ -396,7 +396,7 @@ gnat_finish_incomplete_decl (tree dont_care ATTRIBUTE_UNUSED) ...@@ -396,7 +396,7 @@ gnat_finish_incomplete_decl (tree dont_care ATTRIBUTE_UNUSED)
objects. */ objects. */
void void
gnat_compute_largest_alignment () gnat_compute_largest_alignment (void)
{ {
enum machine_mode mode; enum machine_mode mode;
...@@ -413,7 +413,7 @@ gnat_compute_largest_alignment () ...@@ -413,7 +413,7 @@ gnat_compute_largest_alignment ()
various language dependent hooks. */ various language dependent hooks. */
void void
gnat_init_gcc_eh () gnat_init_gcc_eh (void)
{ {
/* We shouldn't do anything if the No_Exceptions_Handler pragma is set, /* 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 though. This could for instance lead to the emission of tables with
......
...@@ -48,8 +48,7 @@ ...@@ -48,8 +48,7 @@
/* This function provides a portable binding to the mkdir function. */ /* This function provides a portable binding to the mkdir function. */
int int
__gnat_mkdir (dir_name) __gnat_mkdir (char *dir_name)
char *dir_name;
{ {
#if defined (_WIN32) || defined (__vxworks) #if defined (_WIN32) || defined (__vxworks)
return mkdir (dir_name); return mkdir (dir_name);
......
...@@ -58,9 +58,7 @@ typedef char bool; ...@@ -58,9 +58,7 @@ typedef char bool;
/* We have not yet figured out how to import this directly */ /* We have not yet figured out how to import this directly */
void void
_gnat_builtin_longjmp (ptr, flag) _gnat_builtin_longjmp (void *ptr, int flag ATTRIBUTE_UNUSED)
void *ptr;
int flag ATTRIBUTE_UNUSED;
{ {
__builtin_longjmp (ptr, 1); __builtin_longjmp (ptr, 1);
} }
...@@ -72,7 +70,7 @@ _gnat_builtin_longjmp (ptr, flag) ...@@ -72,7 +70,7 @@ _gnat_builtin_longjmp (ptr, flag)
performs any system dependent cleanup required. */ performs any system dependent cleanup required. */
void void
__gnat_unhandled_terminate () __gnat_unhandled_terminate (void)
{ {
/* Special termination handling for VMS */ /* Special termination handling for VMS */
...@@ -108,10 +106,10 @@ typedef struct _Unwind_Context _Unwind_Context; ...@@ -108,10 +106,10 @@ typedef struct _Unwind_Context _Unwind_Context;
typedef struct _Unwind_Exception _Unwind_Exception; typedef struct _Unwind_Exception _Unwind_Exception;
_Unwind_Reason_Code _Unwind_Reason_Code
__gnat_Unwind_RaiseException PARAMS ((_Unwind_Exception *)); __gnat_Unwind_RaiseException (_Unwind_Exception *);
_Unwind_Reason_Code _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 */ #ifdef IN_RTS /* For eh personality routine */
...@@ -540,9 +538,7 @@ typedef struct ...@@ -540,9 +538,7 @@ typedef struct
} region_descriptor; } region_descriptor;
static void static void
db_region_for (region, uw_context) db_region_for (region_descriptor *region, _Unwind_Context *uw_context)
region_descriptor *region;
_Unwind_Context *uw_context;
{ {
_Unwind_Ptr ip = _Unwind_GetIP (uw_context) - 1; _Unwind_Ptr ip = _Unwind_GetIP (uw_context) - 1;
...@@ -563,9 +559,7 @@ db_region_for (region, uw_context) ...@@ -563,9 +559,7 @@ db_region_for (region, uw_context)
ttype table. */ ttype table. */
static const _Unwind_Ptr static const _Unwind_Ptr
get_ttype_entry_for (region, filter) get_ttype_entry_for (region_descriptor *region, long filter)
region_descriptor *region;
long filter;
{ {
_Unwind_Ptr ttype_entry; _Unwind_Ptr ttype_entry;
...@@ -580,9 +574,8 @@ get_ttype_entry_for (region, filter) ...@@ -580,9 +574,8 @@ get_ttype_entry_for (region, filter)
/* Fill out the REGION descriptor for the provided UW_CONTEXT. */ /* Fill out the REGION descriptor for the provided UW_CONTEXT. */
static void static void
get_region_description_for (uw_context, region) get_region_description_for (_Unwind_Context *uw_context,
_Unwind_Context *uw_context; region_descriptor *region)
region_descriptor *region;
{ {
const unsigned char * p; const unsigned char * p;
_Unwind_Word tmp; _Unwind_Word tmp;
...@@ -674,9 +667,7 @@ typedef struct ...@@ -674,9 +667,7 @@ typedef struct
static void static void
db_action_for (action, uw_context) db_action_for (action_descriptor *action, _Unwind_Context *uw_context)
action_descriptor *action;
_Unwind_Context *uw_context;
{ {
_Unwind_Ptr ip = _Unwind_GetIP (uw_context) - 1; _Unwind_Ptr ip = _Unwind_GetIP (uw_context) - 1;
...@@ -725,10 +716,9 @@ db_action_for (action, uw_context) ...@@ -725,10 +716,9 @@ db_action_for (action, uw_context)
#define __builtin_eh_return_data_regno(x) x #define __builtin_eh_return_data_regno(x) x
static void static void
get_call_site_action_for (uw_context, region, action) get_call_site_action_for (_Unwind_Context *uw_context,
_Unwind_Context *uw_context; region_descriptor *region,
region_descriptor *region; action_descriptor *action)
action_descriptor *action;
{ {
_Unwind_Ptr call_site _Unwind_Ptr call_site
= _Unwind_GetIP (uw_context) - 1; = _Unwind_GetIP (uw_context) - 1;
...@@ -786,10 +776,9 @@ get_call_site_action_for (uw_context, region, action) ...@@ -786,10 +776,9 @@ get_call_site_action_for (uw_context, region, action)
/* ! __USING_SJLJ_EXCEPTIONS__ */ /* ! __USING_SJLJ_EXCEPTIONS__ */
static void static void
get_call_site_action_for (uw_context, region, action) get_call_site_action_for (_Unwind_Context *uw_context,
_Unwind_Context *uw_context; region_descriptor *region,
region_descriptor *region; action_descriptor *action)
action_descriptor *action;
{ {
_Unwind_Ptr ip _Unwind_Ptr ip
= _Unwind_GetIP (uw_context) - 1; = _Unwind_GetIP (uw_context) - 1;
...@@ -861,11 +850,10 @@ get_call_site_action_for (uw_context, region, action) ...@@ -861,11 +850,10 @@ get_call_site_action_for (uw_context, region, action)
UW_CONTEXT in REGION. */ UW_CONTEXT in REGION. */
static void static void
get_action_description_for (uw_context, uw_exception, region, action) get_action_description_for (_Unwind_Context *uw_context,
_Unwind_Context *uw_context; _Unwind_Exception *uw_exception,
_Unwind_Exception *uw_exception; region_descriptor *regionr,
region_descriptor *region; action_descriptor *actionr)
action_descriptor *action;
{ {
_GNAT_Exception * gnat_exception = (_GNAT_Exception *) uw_exception; _GNAT_Exception * gnat_exception = (_GNAT_Exception *) uw_exception;
...@@ -950,11 +938,10 @@ get_action_description_for (uw_context, uw_exception, region, action) ...@@ -950,11 +938,10 @@ get_action_description_for (uw_context, uw_exception, region, action)
occured. */ occured. */
static void static void
setup_to_install (uw_context, uw_exception, uw_landing_pad, uw_filter) setup_to_install (_Unwind_Context *uw_context,
_Unwind_Context *uw_context; _Unwind_Exception *uw_exception,
_Unwind_Exception *uw_exception; int uw_filter,
int uw_filter; _Unwind_Ptr uw_landing_pad)
_Unwind_Ptr uw_landing_pad;
{ {
#ifndef EH_RETURN_DATA_REGNO #ifndef EH_RETURN_DATA_REGNO
/* We should not be called if the appropriate underlying support is not /* 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) ...@@ -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 /* The following is defined from a-except.adb. Its purpose is to enable
automatic backtraces upon exception raise, as provided through the automatic backtraces upon exception raise, as provided through the
GNAT.Traceback facilities. */ GNAT.Traceback facilities. */
extern void __gnat_notify_handled_exception PARAMS ((void)); extern void __gnat_notify_handled_exception (void);
extern void __gnat_notify_unhandled_exception PARAMS ((void)); extern void __gnat_notify_unhandled_exception (void);
/* Below is the eh personality routine per se. We currently assume that only /* Below is the eh personality routine per se. We currently assume that only
GNU-Ada exceptions are met. */ GNU-Ada exceptions are met. */
_Unwind_Reason_Code _Unwind_Reason_Code
__gnat_eh_personality (uw_version, uw_phases, __gnat_eh_personality (int uw_version,
uw_exception_class, uw_exception, uw_context) _Unwind_Action uw_phases,
int uw_version; _Unwind_Exception_Class uw_exception_class,
_Unwind_Action uw_phases; _Unwind_Exception *uw_exception,
_Unwind_Exception_Class uw_exception_class; _Unwind_Context *uw_context)
_Unwind_Exception *uw_exception;
_Unwind_Context *uw_context;
{ {
_GNAT_Exception * gnat_exception = (_GNAT_Exception *) uw_exception; _GNAT_Exception * gnat_exception = (_GNAT_Exception *) uw_exception;
...@@ -1075,8 +1060,7 @@ __gnat_eh_personality (uw_version, uw_phases, ...@@ -1075,8 +1060,7 @@ __gnat_eh_personality (uw_version, uw_phases,
#undef _Unwind_RaiseException #undef _Unwind_RaiseException
_Unwind_Reason_Code _Unwind_Reason_Code
__gnat_Unwind_RaiseException (e) __gnat_Unwind_RaiseException (_Unwind_Exception *e)
_Unwind_Exception *e;
{ {
return _Unwind_SjLj_RaiseException (e); return _Unwind_SjLj_RaiseException (e);
} }
...@@ -1085,10 +1069,9 @@ __gnat_Unwind_RaiseException (e) ...@@ -1085,10 +1069,9 @@ __gnat_Unwind_RaiseException (e)
#undef _Unwind_ForcedUnwind #undef _Unwind_ForcedUnwind
_Unwind_Reason_Code _Unwind_Reason_Code
__gnat_Unwind_ForcedUnwind (e, handler, argument) __gnat_Unwind_ForcedUnwind (_Unwind_Exception *e,
_Unwind_Exception *e; void * handler,
void * handler; void * argument)
void * argument;
{ {
return _Unwind_SjLj_ForcedUnwind (e, handler, argument); return _Unwind_SjLj_ForcedUnwind (e, handler, argument);
} }
...@@ -1097,17 +1080,15 @@ __gnat_Unwind_ForcedUnwind (e, handler, argument) ...@@ -1097,17 +1080,15 @@ __gnat_Unwind_ForcedUnwind (e, handler, argument)
#else /* __USING_SJLJ_EXCEPTIONS__ */ #else /* __USING_SJLJ_EXCEPTIONS__ */
_Unwind_Reason_Code _Unwind_Reason_Code
__gnat_Unwind_RaiseException (e) __gnat_Unwind_RaiseException (_Unwind_Exception *e)
_Unwind_Exception *e;
{ {
return _Unwind_RaiseException (e); return _Unwind_RaiseException (e);
} }
_Unwind_Reason_Code _Unwind_Reason_Code
__gnat_Unwind_ForcedUnwind (e, handler, argument) __gnat_Unwind_ForcedUnwind (_Unwind_Exception *e,
_Unwind_Exception *e; void * handler,
void * handler; void * argument)
void * argument;
{ {
return _Unwind_ForcedUnwind (e, handler, argument); return _Unwind_ForcedUnwind (e, handler, argument);
} }
...@@ -1127,18 +1108,16 @@ __gnat_Unwind_ForcedUnwind (e, handler, argument) ...@@ -1127,18 +1108,16 @@ __gnat_Unwind_ForcedUnwind (e, handler, argument)
functions never to be called. */ functions never to be called. */
_Unwind_Reason_Code _Unwind_Reason_Code
__gnat_Unwind_RaiseException (e) __gnat_Unwind_RaiseException (_Unwind_Exception *e ATTRIBUTE_UNUSED)
_Unwind_Exception *e ATTRIBUTE_UNUSED;
{ {
abort (); abort ();
} }
_Unwind_Reason_Code _Unwind_Reason_Code
__gnat_Unwind_ForcedUnwind (e, handler, argument) __gnat_Unwind_ForcedUnwind (_Unwind_Exception *e ATTRIBUTE_UNUSED,
_Unwind_Exception *e ATTRIBUTE_UNUSED; void * handler ATTRIBUTE_UNUSED,
void * handler ATTRIBUTE_UNUSED; void * argument ATTRIBUTE_UNUSED)
void * argument ATTRIBUTE_UNUSED;
{ {
abort (); abort ();
} }
......
...@@ -66,19 +66,18 @@ ...@@ -66,19 +66,18 @@
#include "raise.h" #include "raise.h"
extern void __gnat_free_socket_set PARAMS ((fd_set *)); extern void __gnat_free_socket_set (fd_set *);
extern void __gnat_last_socket_in_set PARAMS ((fd_set *, int *)); extern void __gnat_last_socket_in_set (fd_set *, int *);
extern void __gnat_get_socket_from_set PARAMS ((fd_set *, int *, int *)); extern void __gnat_get_socket_from_set (fd_set *, int *, int *);
extern void __gnat_insert_socket_in_set PARAMS ((fd_set *, int)); extern void __gnat_insert_socket_in_set (fd_set *, int);
extern int __gnat_is_socket_in_set PARAMS ((fd_set *, int)); extern int __gnat_is_socket_in_set (fd_set *, int);
extern fd_set *__gnat_new_socket_set PARAMS ((fd_set *)); extern fd_set *__gnat_new_socket_set (fd_set *);
extern void __gnat_remove_socket_from_set PARAMS ((fd_set *, int)); extern void __gnat_remove_socket_from_set (fd_set *, int);
/* Free socket set. */ /* Free socket set. */
void void
__gnat_free_socket_set (set) __gnat_free_socket_set (fd_set *set)
fd_set *set;
{ {
__gnat_free (set); __gnat_free (set);
} }
...@@ -89,9 +88,7 @@ __gnat_free_socket_set (set) ...@@ -89,9 +88,7 @@ __gnat_free_socket_set (set)
actual largest socket in the socket set. */ actual largest socket in the socket set. */
void void
__gnat_last_socket_in_set (set, last) __gnat_last_socket_in_set (fd_set *set, int *last)
fd_set *set;
int *last;
{ {
int s; int s;
int l; int l;
...@@ -122,10 +119,7 @@ __gnat_last_socket_in_set (set, last) ...@@ -122,10 +119,7 @@ __gnat_last_socket_in_set (set, last)
socket in the socket set. */ socket in the socket set. */
void void
__gnat_get_socket_from_set (set, last, socket) __gnat_get_socket_from_set (fd_set *set, int *last, int *socket)
fd_set *set;
int *last;
int *socket;
{ {
*socket = *last; *socket = *last;
FD_CLR (*socket, set); FD_CLR (*socket, set);
...@@ -135,9 +129,7 @@ __gnat_get_socket_from_set (set, last, socket) ...@@ -135,9 +129,7 @@ __gnat_get_socket_from_set (set, last, socket)
/* Insert SOCKET in the socket set SET. */ /* Insert SOCKET in the socket set SET. */
void void
__gnat_insert_socket_in_set (set, socket) __gnat_insert_socket_in_set (fd_set *set, int socket)
fd_set *set;
int socket;
{ {
FD_SET (socket, set); FD_SET (socket, set);
} }
...@@ -145,9 +137,7 @@ __gnat_insert_socket_in_set (set, socket) ...@@ -145,9 +137,7 @@ __gnat_insert_socket_in_set (set, socket)
/* Check whether a given SOCKET is in the socket set SET. */ /* Check whether a given SOCKET is in the socket set SET. */
int int
__gnat_is_socket_in_set (set, socket) __gnat_is_socket_in_set (fd_set *set, int socket)
fd_set *set;
int socket;
{ {
return FD_ISSET (socket, set); return FD_ISSET (socket, set);
} }
...@@ -155,8 +145,7 @@ __gnat_is_socket_in_set (set, socket) ...@@ -155,8 +145,7 @@ __gnat_is_socket_in_set (set, socket)
/* Allocate a new socket set and set it as empty. */ /* Allocate a new socket set and set it as empty. */
fd_set * fd_set *
__gnat_new_socket_set (set) __gnat_new_socket_set (fd_set *set)
fd_set *set;
{ {
fd_set *new; fd_set *new;
...@@ -173,9 +162,7 @@ __gnat_new_socket_set (set) ...@@ -173,9 +162,7 @@ __gnat_new_socket_set (set)
/* Remove SOCKET from the socket set SET. */ /* Remove SOCKET from the socket set SET. */
void void
__gnat_remove_socket_from_set (set, socket) __gnat_remove_socket_from_set (fd_set *set, int socket)
fd_set *set;
int socket;
{ {
FD_CLR (socket, set); FD_CLR (socket, set);
} }
...@@ -157,15 +157,13 @@ static const char *mode_append_binary_plus = "a+b"; ...@@ -157,15 +157,13 @@ static const char *mode_append_binary_plus = "a+b";
const char __gnat_text_translation_required = 1; const char __gnat_text_translation_required = 1;
void void
__gnat_set_binary_mode (handle) __gnat_set_binary_mode (int handle)
int handle;
{ {
_setmode (handle, O_BINARY); _setmode (handle, O_BINARY);
} }
void void
__gnat_set_text_mode (handle) __gnat_set_text_mode (int handle)
int handle;
{ {
_setmode (handle, O_TEXT); _setmode (handle, O_TEXT);
} }
...@@ -178,8 +176,7 @@ __gnat_set_text_mode (handle) ...@@ -178,8 +176,7 @@ __gnat_set_text_mode (handle)
"console". */ "console". */
char * char *
__gnat_ttyname (filedes) __gnat_ttyname (int filedes)
int filedes;
{ {
if (isatty (filedes)) if (isatty (filedes))
return "console"; return "console";
...@@ -206,22 +203,22 @@ __gnat_ttyname (filedes) ...@@ -206,22 +203,22 @@ __gnat_ttyname (filedes)
Calling FlushConsoleInputBuffer just after getch() fix the bug under Calling FlushConsoleInputBuffer just after getch() fix the bug under
95/98. */ 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 /* winflusfunction is set first to the winflushinit function which will check
the OS version 95/98 or NT/2000 */ 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 /* This function does the runtime check of the OS version and then sets
winflush_function to the appropriate function and then call it. */ winflush_function to the appropriate function and then call it. */
static void static void
winflush_init () winflush_init (void)
{ {
DWORD dwVersion = GetVersion(); DWORD dwVersion = GetVersion();
...@@ -234,12 +231,12 @@ winflush_init () ...@@ -234,12 +231,12 @@ winflush_init ()
} }
static void winflush_95 () static void winflush_95 (void)
{ {
FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE)); FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE));
} }
static void winflush_nt () static void winflush_nt (void)
{ {
/* Does nothing as there is no problem under NT. */ /* Does nothing as there is no problem under NT. */
} }
...@@ -264,22 +261,19 @@ const char __gnat_text_translation_required = 0; ...@@ -264,22 +261,19 @@ const char __gnat_text_translation_required = 0;
/* These functions do nothing in non-DOS systems. */ /* These functions do nothing in non-DOS systems. */
void void
__gnat_set_binary_mode (handle) __gnat_set_binary_mode (int handle ATTRIBUTE_UNUSED)
int handle ATTRIBUTE_UNUSED;
{ {
} }
void void
__gnat_set_text_mode (handle) __gnat_set_text_mode (int handle ATTRIBUTE_UNUSED)
int handle ATTRIBUTE_UNUSED;
{ {
} }
char * char *
__gnat_ttyname (filedes) __gnat_ttyname (int filedes)
int filedes;
{ {
#ifndef __vxworks #ifndef __vxworks
extern char *ttyname PARAMS ((int)); extern char *ttyname (int);
return ttyname (filedes); return ttyname (filedes);
...@@ -315,18 +309,14 @@ static int initted = 0; ...@@ -315,18 +309,14 @@ static int initted = 0;
/* Implements the common processing for getc_immediate and /* Implements the common processing for getc_immediate and
getc_immediate_nowait. */ getc_immediate_nowait. */
extern void getc_immediate PARAMS ((FILE *, int *, int *)); extern void getc_immediate (FILE *, int *, int *);
extern void getc_immediate_nowait PARAMS ((FILE *, int *, int *, int *)); extern void getc_immediate_nowait (FILE *, int *, int *, int *);
extern void getc_immediate_common PARAMS ((FILE *, int *, int *, extern void getc_immediate_common (FILE *, int *, int *, int *, int);
int *, int));
/* Called by Get_Immediate (Foo); */ /* Called by Get_Immediate (Foo); */
void void
getc_immediate (stream, ch, end_of_file) getc_immediate (FILE *stream, int *ch, int *end_of_file)
FILE *stream;
int *ch;
int *end_of_file;
{ {
int avail; int avail;
...@@ -336,11 +326,7 @@ getc_immediate (stream, ch, end_of_file) ...@@ -336,11 +326,7 @@ getc_immediate (stream, ch, end_of_file)
/* Called by Get_Immediate (Foo, Available); */ /* Called by Get_Immediate (Foo, Available); */
void void
getc_immediate_nowait (stream, ch, end_of_file, avail) getc_immediate_nowait (FILE *stream, int *ch, int *end_of_file, int *avail)
FILE *stream;
int *ch;
int *end_of_file;
int *avail;
{ {
getc_immediate_common (stream, ch, end_of_file, avail, 0); getc_immediate_common (stream, ch, end_of_file, avail, 0);
} }
...@@ -348,12 +334,11 @@ getc_immediate_nowait (stream, ch, end_of_file, avail) ...@@ -348,12 +334,11 @@ getc_immediate_nowait (stream, ch, end_of_file, avail)
/* Called by getc_immediate () and getc_immediate_nowait () */ /* Called by getc_immediate () and getc_immediate_nowait () */
void void
getc_immediate_common (stream, ch, end_of_file, avail, waiting) getc_immediate_common (FILE *stream,
FILE *stream; int *ch,
int *ch; int *end_of_file,
int *end_of_file; int *avail,
int *avail; int waiting)
int waiting;
{ {
#if defined (linux) || defined (sun) || defined (sgi) || defined (__EMX__) \ #if defined (linux) || defined (sun) || defined (sgi) || defined (__EMX__) \
|| (defined (__osf__) && ! defined (__alpha_vxworks)) \ || (defined (__osf__) && ! defined (__alpha_vxworks)) \
...@@ -614,31 +599,31 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting) ...@@ -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 will want to import these). We use the same names as the routines used
by AdaMagic for compatibility. */ by AdaMagic for compatibility. */
char *rts_get_hInstance PARAMS ((void)); char *rts_get_hInstance (void);
char *rts_get_hPrevInstance PARAMS ((void)); char *rts_get_hPrevInstance (void);
char *rts_get_lpCommandLine PARAMS ((void)); char *rts_get_lpCommandLine (void);
int rts_get_nShowCmd PARAMS ((void)); int rts_get_nShowCmd (void);
char * char *
rts_get_hInstance () rts_get_hInstance (void)
{ {
return (char *)GetModuleHandleA (0); return (char *)GetModuleHandleA (0);
} }
char * char *
rts_get_hPrevInstance () rts_get_hPrevInstance (void)
{ {
return 0; return 0;
} }
char * char *
rts_get_lpCommandLine () rts_get_lpCommandLine (void)
{ {
return GetCommandLineA (); return GetCommandLineA ();
} }
int int
rts_get_nShowCmd () rts_get_nShowCmd (void)
{ {
return 1; return 1;
} }
...@@ -650,10 +635,10 @@ rts_get_nShowCmd () ...@@ -650,10 +635,10 @@ rts_get_nShowCmd ()
#include <time.h> #include <time.h>
extern long get_gmtoff PARAMS ((void)); extern long get_gmtoff (void);
long long
get_gmtoff () get_gmtoff (void)
{ {
time_t t; time_t t;
struct tm *ts; struct tm *ts;
...@@ -668,22 +653,19 @@ get_gmtoff () ...@@ -668,22 +653,19 @@ get_gmtoff ()
#if defined (_AIX) || defined (__EMX__) #if defined (_AIX) || defined (__EMX__)
#define Lock_Task system__soft_links__lock_task #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 #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 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 provide localtime_r, but in the library libc_r which doesn't get included
systematically, so we can't use it. */ systematically, so we can't use it. */
extern struct tm *__gnat_localtime_r PARAMS ((const time_t *, extern struct tm *__gnat_localtime_r (const time_t *, struct tm *);
struct tm *));
struct tm * struct tm *
__gnat_localtime_r (timer, tp) __gnat_localtime_r (const time_t *timer, struct tm *tp)
const time_t *timer;
struct tm *tp;
{ {
struct tm *tmp; struct tm *tmp;
...@@ -703,12 +685,10 @@ __gnat_localtime_r (timer, tp) ...@@ -703,12 +685,10 @@ __gnat_localtime_r (timer, tp)
spec is required. Only use when ___THREADS_POSIX4ad4__ is defined, spec is required. Only use when ___THREADS_POSIX4ad4__ is defined,
the Lynx convention when building against the legacy API. */ 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 * struct tm *
__gnat_localtime_r (timer, tp) __gnat_localtime_r (const time_t *timer, struct tm *tp)
const time_t *timer;
struct tm *tp;
{ {
localtime_r (tp, timer); localtime_r (tp, timer);
return NULL; return NULL;
...@@ -723,12 +703,10 @@ __gnat_localtime_r (timer, tp) ...@@ -723,12 +703,10 @@ __gnat_localtime_r (timer, tp)
/* All other targets provide a standard localtime_r */ /* 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 * struct tm *
__gnat_localtime_r (timer, tp) __gnat_localtime_r (const time_t *timer, struct tm *tp)
const time_t *timer;
struct tm *tp;
{ {
return (struct tm *) localtime_r (timer, tp); return (struct tm *) localtime_r (timer, tp);
} }
......
...@@ -69,86 +69,86 @@ ...@@ -69,86 +69,86 @@
to determine the sizes that are used for various C types. */ to determine the sizes that are used for various C types. */
Pos Pos
get_target_bits_per_unit () get_target_bits_per_unit (void)
{ {
return BITS_PER_UNIT; return BITS_PER_UNIT;
} }
Pos Pos
get_target_bits_per_word () get_target_bits_per_word (void)
{ {
return BITS_PER_WORD; return BITS_PER_WORD;
} }
Pos Pos
get_target_char_size () get_target_char_size (void)
{ {
return CHAR_TYPE_SIZE; return CHAR_TYPE_SIZE;
} }
Pos Pos
get_target_wchar_t_size () get_target_wchar_t_size (void)
{ {
/* We never want wide chacters less than "short" in Ada. */ /* We never want wide chacters less than "short" in Ada. */
return MAX (SHORT_TYPE_SIZE, WCHAR_TYPE_SIZE); return MAX (SHORT_TYPE_SIZE, WCHAR_TYPE_SIZE);
} }
Pos Pos
get_target_short_size () get_target_short_size (void)
{ {
return SHORT_TYPE_SIZE; return SHORT_TYPE_SIZE;
} }
Pos Pos
get_target_int_size () get_target_int_size (void)
{ {
return INT_TYPE_SIZE; return INT_TYPE_SIZE;
} }
Pos Pos
get_target_long_size () get_target_long_size (void)
{ {
return ADA_LONG_TYPE_SIZE; return ADA_LONG_TYPE_SIZE;
} }
Pos Pos
get_target_long_long_size () get_target_long_long_size (void)
{ {
return LONG_LONG_TYPE_SIZE; return LONG_LONG_TYPE_SIZE;
} }
Pos Pos
get_target_float_size () get_target_float_size (void)
{ {
return FLOAT_TYPE_SIZE; return FLOAT_TYPE_SIZE;
} }
Pos Pos
get_target_double_size () get_target_double_size (void)
{ {
return DOUBLE_TYPE_SIZE; return DOUBLE_TYPE_SIZE;
} }
Pos Pos
get_target_long_double_size () get_target_long_double_size (void)
{ {
return WIDEST_HARDWARE_FP_SIZE; return WIDEST_HARDWARE_FP_SIZE;
} }
Pos Pos
get_target_pointer_size () get_target_pointer_size (void)
{ {
return POINTER_SIZE; return POINTER_SIZE;
} }
Pos Pos
get_target_maximum_alignment () get_target_maximum_alignment (void)
{ {
return BIGGEST_ALIGNMENT / BITS_PER_UNIT; return BIGGEST_ALIGNMENT / BITS_PER_UNIT;
} }
Boolean Boolean
get_target_no_dollar_in_label () get_target_no_dollar_in_label (void)
{ {
#ifdef NO_DOLLAR_IN_LABEL #ifdef NO_DOLLAR_IN_LABEL
return 1; return 1;
...@@ -162,31 +162,31 @@ get_target_no_dollar_in_label () ...@@ -162,31 +162,31 @@ get_target_no_dollar_in_label ()
#endif #endif
Nat Nat
get_float_words_be () get_float_words_be (void)
{ {
return FLOAT_WORDS_BIG_ENDIAN; return FLOAT_WORDS_BIG_ENDIAN;
} }
Nat Nat
get_words_be () get_words_be (void)
{ {
return WORDS_BIG_ENDIAN; return WORDS_BIG_ENDIAN;
} }
Nat Nat
get_bytes_be () get_bytes_be (void)
{ {
return BYTES_BIG_ENDIAN; return BYTES_BIG_ENDIAN;
} }
Nat Nat
get_bits_be () get_bits_be (void)
{ {
return BITS_BIG_ENDIAN; return BITS_BIG_ENDIAN;
} }
Nat Nat
get_strict_alignment () get_strict_alignment (void)
{ {
return STRICT_ALIGNMENT; return STRICT_ALIGNMENT;
} }
...@@ -207,12 +207,11 @@ typedef struct { ...@@ -207,12 +207,11 @@ typedef struct {
********************/ ********************/
int int
__gnat_backtrace (array, size, exclude_min, exclude_max, skip_frames) __gnat_backtrace (void **array,
void **array; int size,
int size; void *exclude_min,
void *exclude_min; void *exclude_max,
void *exclude_max; int skip_frames)
int skip_frames;
{ {
int cnt; int cnt;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <limits.h> #include <limits.h>
#include <string.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 /* We still use a number of macros similar to the ones for the generic
__gnat_backtrace implementation. */ __gnat_backtrace implementation. */
...@@ -259,8 +259,7 @@ struct alloc_chain ...@@ -259,8 +259,7 @@ struct alloc_chain
struct alloc_chain *trace_alloc_chain; struct alloc_chain *trace_alloc_chain;
static void * static void *
trace_alloc (n) trace_alloc (unsigned int n)
unsigned int n;
{ {
struct alloc_chain * result = malloc (n + sizeof(struct alloc_chain)); struct alloc_chain * result = malloc (n + sizeof(struct alloc_chain));
...@@ -270,7 +269,7 @@ trace_alloc (n) ...@@ -270,7 +269,7 @@ trace_alloc (n)
} }
static void static void
free_trace_alloc () free_trace_alloc (void)
{ {
while (trace_alloc_chain != 0) while (trace_alloc_chain != 0)
{ {
...@@ -285,9 +284,7 @@ free_trace_alloc () ...@@ -285,9 +284,7 @@ free_trace_alloc ()
otherwise. */ otherwise. */
static int static int
read_memory_safe4 (addr, dest) read_memory_safe4 (CORE_ADDR addr, unsigned int *dest)
CORE_ADDR addr;
unsigned int *dest;
{ {
*dest = *((unsigned int*) addr); *dest = *((unsigned int*) addr);
return 0; return 0;
...@@ -297,17 +294,14 @@ read_memory_safe4 (addr, dest) ...@@ -297,17 +294,14 @@ read_memory_safe4 (addr, dest)
otherwise. */ otherwise. */
static int static int
read_memory_safe8 (addr, dest) read_memory_safe8 (CORE_ADDR addr, CORE_ADDR *dest)
CORE_ADDR addr;
CORE_ADDR *dest;
{ {
*dest = *((CORE_ADDR*) addr); *dest = *((CORE_ADDR*) addr);
return 0; return 0;
} }
static CORE_ADDR static CORE_ADDR
read_register (regno) read_register (int regno)
int regno;
{ {
if (regno >= 0 && regno < 31) if (regno >= 0 && regno < 31)
return theRegisters[regno]; return theRegisters[regno];
...@@ -316,23 +310,20 @@ read_register (regno) ...@@ -316,23 +310,20 @@ read_register (regno)
} }
static void static void
frame_saved_regs_zalloc (fi) frame_saved_regs_zalloc (struct frame_info *fi)
struct frame_info *fi;
{ {
fi->saved_regs = (CORE_ADDR *) trace_alloc (SIZEOF_FRAME_SAVED_REGS); fi->saved_regs = (CORE_ADDR *) trace_alloc (SIZEOF_FRAME_SAVED_REGS);
memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS); memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
} }
static void * static void *
frame_obstack_alloc (size) frame_obstack_alloc (unsigned long size)
unsigned long size;
{ {
return (void *) trace_alloc (size); return (void *) trace_alloc (size);
} }
static int static int
inside_entry_file (addr) inside_entry_file (CORE_ADDR addr)
CORE_ADDR addr;
{ {
if (addr == 0) if (addr == 0)
return 1; return 1;
...@@ -341,8 +332,7 @@ inside_entry_file (addr) ...@@ -341,8 +332,7 @@ inside_entry_file (addr)
} }
static CORE_ADDR static CORE_ADDR
alpha_saved_pc_after_call (frame) alpha_saved_pc_after_call (struct frame_info *frame)
struct frame_info *frame;
{ {
CORE_ADDR pc = frame->pc; CORE_ADDR pc = frame->pc;
alpha_extra_func_info_t proc_desc; alpha_extra_func_info_t proc_desc;
...@@ -358,8 +348,7 @@ alpha_saved_pc_after_call (frame) ...@@ -358,8 +348,7 @@ alpha_saved_pc_after_call (frame)
NULL). */ NULL). */
static void static void
alpha_find_saved_regs (frame) alpha_find_saved_regs (struct frame_info *frame)
struct frame_info *frame;
{ {
int ireg; int ireg;
CORE_ADDR reg_position; CORE_ADDR reg_position;
...@@ -430,9 +419,7 @@ alpha_find_saved_regs (frame) ...@@ -430,9 +419,7 @@ alpha_find_saved_regs (frame)
} }
static CORE_ADDR static CORE_ADDR
read_next_frame_reg (fi, regno) read_next_frame_reg (struct frame_info *fi, int regno)
struct frame_info *fi;
int regno;
{ {
CORE_ADDR result; CORE_ADDR result;
for (; fi; fi = fi->next) for (; fi; fi = fi->next)
...@@ -460,8 +447,7 @@ read_next_frame_reg (fi, regno) ...@@ -460,8 +447,7 @@ read_next_frame_reg (fi, regno)
} }
static CORE_ADDR static CORE_ADDR
alpha_frame_saved_pc (frame) alpha_frame_saved_pc (struct frame_info *frame)
struct frame_info *frame;
{ {
return read_next_frame_reg (frame, frame->pc_reg); return read_next_frame_reg (frame, frame->pc_reg);
} }
...@@ -472,8 +458,7 @@ static struct alpha_extra_func_info temp_proc_desc; ...@@ -472,8 +458,7 @@ static struct alpha_extra_func_info temp_proc_desc;
$zero,($ra),1" on alpha. */ $zero,($ra),1" on alpha. */
static int static int
alpha_about_to_return (pc) alpha_about_to_return (CORE_ADDR pc)
CORE_ADDR pc;
{ {
int inst; int inst;
...@@ -485,8 +470,7 @@ alpha_about_to_return (pc) ...@@ -485,8 +470,7 @@ alpha_about_to_return (pc)
containing address PC. Returns 0 if none detected. */ containing address PC. Returns 0 if none detected. */
static CORE_ADDR static CORE_ADDR
heuristic_proc_start (pc) heuristic_proc_start (CORE_ADDR pc)
CORE_ADDR pc;
{ {
CORE_ADDR start_pc = pc; CORE_ADDR start_pc = pc;
CORE_ADDR fence = start_pc - heuristic_fence_post; CORE_ADDR fence = start_pc - heuristic_fence_post;
...@@ -512,11 +496,10 @@ heuristic_proc_start (pc) ...@@ -512,11 +496,10 @@ heuristic_proc_start (pc)
} }
static alpha_extra_func_info_t static alpha_extra_func_info_t
heuristic_proc_desc (start_pc, limit_pc, next_frame, saved_regs_p) heuristic_proc_desc (CORE_ADDR start_pc,
CORE_ADDR start_pc; CORE_ADDR limit_pc,
CORE_ADDR limit_pc; struct frame_info *next_frame,
struct frame_info *next_frame; struct frame_saved_regs *saved_regs_p)
struct frame_saved_regs *saved_regs_p;
{ {
CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM); CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM);
CORE_ADDR cur_pc; CORE_ADDR cur_pc;
...@@ -641,10 +624,9 @@ heuristic_proc_desc (start_pc, limit_pc, next_frame, saved_regs_p) ...@@ -641,10 +624,9 @@ heuristic_proc_desc (start_pc, limit_pc, next_frame, saved_regs_p)
} }
static alpha_extra_func_info_t static alpha_extra_func_info_t
find_proc_desc (pc, next_frame, saved_regs) find_proc_desc (CORE_ADDR pc,
CORE_ADDR pc; struct frame_info *next_frame,
struct frame_info *next_frame; struct frame_saved_regs *saved_regs)
struct frame_saved_regs *saved_regs;
{ {
CORE_ADDR startaddr; CORE_ADDR startaddr;
...@@ -660,8 +642,7 @@ find_proc_desc (pc, next_frame, saved_regs) ...@@ -660,8 +642,7 @@ find_proc_desc (pc, next_frame, saved_regs)
} }
static CORE_ADDR static CORE_ADDR
alpha_frame_chain (frame) alpha_frame_chain (struct frame_info *frame)
struct frame_info *frame;
{ {
alpha_extra_func_info_t proc_desc; alpha_extra_func_info_t proc_desc;
CORE_ADDR saved_pc = FRAME_SAVED_PC (frame); CORE_ADDR saved_pc = FRAME_SAVED_PC (frame);
...@@ -685,8 +666,7 @@ alpha_frame_chain (frame) ...@@ -685,8 +666,7 @@ alpha_frame_chain (frame)
} }
static void static void
init_extra_frame_info (frame) init_extra_frame_info (struct frame_info *frame)
struct frame_info *frame;
{ {
struct frame_saved_regs temp_saved_regs; struct frame_saved_regs temp_saved_regs;
alpha_extra_func_info_t proc_desc = alpha_extra_func_info_t proc_desc =
...@@ -729,9 +709,7 @@ init_extra_frame_info (frame) ...@@ -729,9 +709,7 @@ init_extra_frame_info (frame)
Always returns a non-NULL value. */ Always returns a non-NULL value. */
static struct frame_info * static struct frame_info *
create_new_frame (addr, pc) create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
CORE_ADDR addr;
CORE_ADDR pc;
{ {
struct frame_info *fi; struct frame_info *fi;
...@@ -754,19 +732,19 @@ create_new_frame (addr, pc) ...@@ -754,19 +732,19 @@ create_new_frame (addr, pc)
static CORE_ADDR current_pc; static CORE_ADDR current_pc;
static void static void
set_current_pc () set_current_pc (void)
{ {
current_pc = (CORE_ADDR) __builtin_return_address (0); current_pc = (CORE_ADDR) __builtin_return_address (0);
} }
static CORE_ADDR static CORE_ADDR
read_pc () read_pc (void)
{ {
return current_pc; return current_pc;
} }
static struct frame_info * static struct frame_info *
get_current_frame () get_current_frame (void)
{ {
return create_new_frame (0, read_pc ()); return create_new_frame (0, read_pc ());
} }
...@@ -775,8 +753,7 @@ get_current_frame () ...@@ -775,8 +753,7 @@ get_current_frame ()
If FI is the original frame (it has no caller), return 0. */ If FI is the original frame (it has no caller), return 0. */
static struct frame_info * static struct frame_info *
get_prev_frame (next_frame) get_prev_frame (struct frame_info *next_frame)
struct frame_info *next_frame;
{ {
CORE_ADDR address = 0; CORE_ADDR address = 0;
struct frame_info *prev; struct frame_info *prev;
...@@ -897,12 +874,11 @@ get_prev_frame (next_frame) ...@@ -897,12 +874,11 @@ get_prev_frame (next_frame)
"stq $" #regno ", " #disp "(%0)\n" "stq $" #regno ", " #disp "(%0)\n"
int int
__gnat_backtrace (array, size, exclude_min, exclude_max, skip_frames) __gnat_backtrace (void **array,
void **array; int size,
int size; void *exclude_min,
void *exclude_min; void *exclude_max,
void *exclude_max; int skip_frames)
int skip_frames;
{ {
struct frame_info* top; struct frame_info* top;
struct frame_info* current; struct frame_info* current;
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
#include "system.h" #include "system.h"
#endif #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 /* The point is to provide an implementation of the __gnat_bactrace function
above, called by the default implementation of the System.Traceback above, called by the default implementation of the System.Traceback
...@@ -77,10 +77,10 @@ extern int __gnat_backtrace PARAMS ((void **, int, void *, void *, int)); ...@@ -77,10 +77,10 @@ extern int __gnat_backtrace PARAMS ((void **, int, void *, void *, int));
function is still referenced by the default System.Traceback. */ function is still referenced by the default System.Traceback. */
#define Lock_Task system__soft_links__lock_task #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 #define Unlock_Task system__soft_links__unlock_task
extern void (*Unlock_Task) PARAMS ((void)); extern void (*Unlock_Task) (void);
/*-------------------------------------* /*-------------------------------------*
*-- Target specific implementations --* *-- Target specific implementations --*
...@@ -339,12 +339,11 @@ static void forced_callee () {} ...@@ -339,12 +339,11 @@ static void forced_callee () {}
#endif #endif
int int
__gnat_backtrace (array, size, exclude_min, exclude_max, skip_frames) __gnat_backtrace (void **array,
void **array; int size,
int size; void *exclude_min,
void *exclude_min; void *exclude_max,
void *exclude_max; int skip_frames)
int skip_frames;
{ {
struct layout *current; struct layout *current;
void *top_frame; void *top_frame;
......
...@@ -44,13 +44,12 @@ ...@@ -44,13 +44,12 @@
#include "ada-tree.h" #include "ada-tree.h"
#include "gigi.h" #include "gigi.h"
static tree find_common_type PARAMS ((tree, tree)); static tree find_common_type (tree, tree);
static int contains_save_expr_p PARAMS ((tree)); static int contains_save_expr_p (tree);
static tree contains_null_expr PARAMS ((tree)); static tree contains_null_expr (tree);
static tree compare_arrays PARAMS ((tree, tree, tree)); static tree compare_arrays (tree, tree, tree);
static tree nonbinary_modular_operation PARAMS ((enum tree_code, tree, static tree nonbinary_modular_operation (enum tree_code, tree, tree, tree);
tree, tree)); static tree build_simple_component_ref (tree, tree, tree, int);
static tree build_simple_component_ref PARAMS ((tree, tree, tree, int));
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR or other logical /* Prepare expr to be an argument of a TRUTH_NOT_EXPR or other logical
operation. operation.
...@@ -68,8 +67,7 @@ static tree build_simple_component_ref PARAMS ((tree, tree, tree, int)); ...@@ -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. */ the only possible operands will be things of Boolean type. */
tree tree
gnat_truthvalue_conversion (expr) gnat_truthvalue_conversion (tree expr)
tree expr;
{ {
tree type = TREE_TYPE (expr); tree type = TREE_TYPE (expr);
...@@ -106,8 +104,7 @@ gnat_truthvalue_conversion (expr) ...@@ -106,8 +104,7 @@ gnat_truthvalue_conversion (expr)
/* Return the base type of TYPE. */ /* Return the base type of TYPE. */
tree tree
get_base_type (type) get_base_type (tree type)
tree type;
{ {
if (TREE_CODE (type) == RECORD_TYPE if (TREE_CODE (type) == RECORD_TYPE
&& TYPE_LEFT_JUSTIFIED_MODULAR_P (type)) && TYPE_LEFT_JUSTIFIED_MODULAR_P (type))
...@@ -123,8 +120,7 @@ get_base_type (type) ...@@ -123,8 +120,7 @@ get_base_type (type)
/* Likewise, but only return types known to the Ada source. */ /* Likewise, but only return types known to the Ada source. */
tree tree
get_ada_base_type (type) get_ada_base_type (tree type)
tree type;
{ {
while (TREE_TYPE (type) != 0 while (TREE_TYPE (type) != 0
&& (TREE_CODE (type) == INTEGER_TYPE && (TREE_CODE (type) == INTEGER_TYPE
...@@ -140,8 +136,7 @@ get_ada_base_type (type) ...@@ -140,8 +136,7 @@ get_ada_base_type (type)
in bits. If we don't know anything about the alignment, return 0. */ in bits. If we don't know anything about the alignment, return 0. */
unsigned int unsigned int
known_alignment (exp) known_alignment (tree exp)
tree exp;
{ {
unsigned int this_alignment; unsigned int this_alignment;
unsigned int lhs, rhs; unsigned int lhs, rhs;
...@@ -221,8 +216,7 @@ known_alignment (exp) ...@@ -221,8 +216,7 @@ known_alignment (exp)
Otherwise return zero. */ Otherwise return zero. */
static tree static tree
find_common_type (t1, t2) find_common_type (tree t1, tree t2)
tree t1, t2;
{ {
/* If either type is non-BLKmode, use it. Note that we know that we will /* 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 not have any alignment problems since if we did the non-BLKmode
...@@ -251,8 +245,7 @@ find_common_type (t1, t2) ...@@ -251,8 +245,7 @@ find_common_type (t1, t2)
of some very general solution. */ of some very general solution. */
static int static int
contains_save_expr_p (exp) contains_save_expr_p (tree exp)
tree exp;
{ {
switch (TREE_CODE (exp)) switch (TREE_CODE (exp))
{ {
...@@ -283,8 +276,7 @@ contains_save_expr_p (exp) ...@@ -283,8 +276,7 @@ contains_save_expr_p (exp)
that are known to raise Constraint_Error. */ that are known to raise Constraint_Error. */
static tree static tree
contains_null_expr (exp) contains_null_expr (tree exp)
tree exp;
{ {
tree tem; tree tem;
...@@ -339,9 +331,7 @@ contains_null_expr (exp) ...@@ -339,9 +331,7 @@ contains_null_expr (exp)
length tests in as efficient a manner as possible. */ length tests in as efficient a manner as possible. */
static tree static tree
compare_arrays (result_type, a1, a2) compare_arrays (tree result_type, tree a1, tree a2)
tree a1, a2;
tree result_type;
{ {
tree t1 = TREE_TYPE (a1); tree t1 = TREE_TYPE (a1);
tree t2 = TREE_TYPE (a2); tree t2 = TREE_TYPE (a2);
...@@ -501,10 +491,10 @@ compare_arrays (result_type, a1, a2) ...@@ -501,10 +491,10 @@ compare_arrays (result_type, a1, a2)
modulus. */ modulus. */
static tree static tree
nonbinary_modular_operation (op_code, type, lhs, rhs) nonbinary_modular_operation (enum tree_code op_code,
enum tree_code op_code; tree type,
tree type; tree lhs,
tree lhs, rhs; tree rhs)
{ {
tree modulus = TYPE_MODULUS (type); tree modulus = TYPE_MODULUS (type);
unsigned int needed_precision = tree_floor_log2 (modulus) + 1; unsigned int needed_precision = tree_floor_log2 (modulus) + 1;
...@@ -601,11 +591,10 @@ nonbinary_modular_operation (op_code, type, lhs, rhs) ...@@ -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. */ have to do here is validate the work done by SEM and handle subtypes. */
tree tree
build_binary_op (op_code, result_type, left_operand, right_operand) build_binary_op (enum tree_code op_code,
enum tree_code op_code; tree result_type,
tree result_type; tree left_operand,
tree left_operand; tree right_operand)
tree right_operand;
{ {
tree left_type = TREE_TYPE (left_operand); tree left_type = TREE_TYPE (left_operand);
tree right_type = TREE_TYPE (right_operand); tree right_type = TREE_TYPE (right_operand);
...@@ -1094,10 +1083,7 @@ build_binary_op (op_code, result_type, left_operand, right_operand) ...@@ -1094,10 +1083,7 @@ build_binary_op (op_code, result_type, left_operand, right_operand)
/* Similar, but for unary operations. */ /* Similar, but for unary operations. */
tree tree
build_unary_op (op_code, result_type, operand) build_unary_op (enum tree_code op_code, tree result_type, tree operand)
enum tree_code op_code;
tree result_type;
tree operand;
{ {
tree type = TREE_TYPE (operand); tree type = TREE_TYPE (operand);
tree base_type = get_base_type (type); tree base_type = get_base_type (type);
...@@ -1415,11 +1401,10 @@ build_unary_op (op_code, result_type, operand) ...@@ -1415,11 +1401,10 @@ build_unary_op (op_code, result_type, operand)
/* Similar, but for COND_EXPR. */ /* Similar, but for COND_EXPR. */
tree tree
build_cond_expr (result_type, condition_operand, true_operand, false_operand) build_cond_expr (tree result_type,
tree result_type; tree condition_operand,
tree condition_operand; tree true_operand,
tree true_operand; tree false_operand)
tree false_operand;
{ {
tree result; tree result;
int addr_p = 0; int addr_p = 0;
...@@ -1470,9 +1455,7 @@ build_cond_expr (result_type, condition_operand, true_operand, false_operand) ...@@ -1470,9 +1455,7 @@ build_cond_expr (result_type, condition_operand, true_operand, false_operand)
the CALL_EXPR. */ the CALL_EXPR. */
tree tree
build_call_1_expr (fundecl, arg) build_call_1_expr (tree fundecl, tree arg)
tree fundecl;
tree arg;
{ {
tree call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fundecl)), tree call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fundecl)),
build_unary_op (ADDR_EXPR, NULL_TREE, fundecl), build_unary_op (ADDR_EXPR, NULL_TREE, fundecl),
...@@ -1488,9 +1471,7 @@ build_call_1_expr (fundecl, arg) ...@@ -1488,9 +1471,7 @@ build_call_1_expr (fundecl, arg)
the CALL_EXPR. */ the CALL_EXPR. */
tree tree
build_call_2_expr (fundecl, arg1, arg2) build_call_2_expr (tree fundecl, tree arg1, tree arg2)
tree fundecl;
tree arg1, arg2;
{ {
tree call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fundecl)), tree call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fundecl)),
build_unary_op (ADDR_EXPR, NULL_TREE, fundecl), build_unary_op (ADDR_EXPR, NULL_TREE, fundecl),
...@@ -1507,8 +1488,7 @@ build_call_2_expr (fundecl, arg1, arg2) ...@@ -1507,8 +1488,7 @@ build_call_2_expr (fundecl, arg1, arg2)
/* Likewise to call FUNDECL with no arguments. */ /* Likewise to call FUNDECL with no arguments. */
tree tree
build_call_0_expr (fundecl) build_call_0_expr (tree fundecl)
tree fundecl;
{ {
tree call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fundecl)), tree call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fundecl)),
build_unary_op (ADDR_EXPR, NULL_TREE, fundecl), build_unary_op (ADDR_EXPR, NULL_TREE, fundecl),
...@@ -1523,8 +1503,7 @@ build_call_0_expr (fundecl) ...@@ -1523,8 +1503,7 @@ build_call_0_expr (fundecl)
name, if requested. MSG says which exception function to call. */ name, if requested. MSG says which exception function to call. */
tree tree
build_call_raise (msg) build_call_raise (int msg)
int msg;
{ {
tree fndecl = gnat_raise_decls[msg]; tree fndecl = gnat_raise_decls[msg];
const char *str = discard_file_names ? "" : ref_filename; const char *str = discard_file_names ? "" : ref_filename;
...@@ -1545,9 +1524,7 @@ build_call_raise (msg) ...@@ -1545,9 +1524,7 @@ build_call_raise (msg)
/* Return a CONSTRUCTOR of TYPE whose list is LIST. */ /* Return a CONSTRUCTOR of TYPE whose list is LIST. */
tree tree
gnat_build_constructor (type, list) gnat_build_constructor (tree type, tree list)
tree type;
tree list;
{ {
tree elmt; tree elmt;
int allconstant = (TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST); int allconstant = (TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST);
...@@ -1616,11 +1593,10 @@ gnat_build_constructor (type, list) ...@@ -1616,11 +1593,10 @@ gnat_build_constructor (type, list)
actual record and know how to look for fields in variant parts. */ actual record and know how to look for fields in variant parts. */
static tree static tree
build_simple_component_ref (record_variable, component, field, no_fold_p) build_simple_component_ref (tree record_variable,
tree record_variable; tree component,
tree component; tree field,
tree field; int no_fold_p)
int no_fold_p;
{ {
tree record_type = TYPE_MAIN_VARIANT (TREE_TYPE (record_variable)); tree record_type = TYPE_MAIN_VARIANT (TREE_TYPE (record_variable));
tree ref; tree ref;
...@@ -1707,11 +1683,10 @@ build_simple_component_ref (record_variable, component, field, no_fold_p) ...@@ -1707,11 +1683,10 @@ build_simple_component_ref (record_variable, component, field, no_fold_p)
reference could not be found. */ reference could not be found. */
tree tree
build_component_ref (record_variable, component, field, no_fold_p) build_component_ref (tree record_variable,
tree record_variable; tree component,
tree component; tree field,
tree field; int no_fold_p)
int no_fold_p;
{ {
tree ref = build_simple_component_ref (record_variable, component, field, tree ref = build_simple_component_ref (record_variable, component, field,
no_fold_p); no_fold_p);
...@@ -1741,14 +1716,12 @@ build_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. */ object dynamically on the stack frame. */
tree tree
build_call_alloc_dealloc build_call_alloc_dealloc (tree gnu_obj,
(gnu_obj, gnu_size, align, gnat_proc, gnat_pool, gnat_node) tree gnu_size,
tree gnu_obj; int align,
tree gnu_size; Entity_Id gnat_proc,
int align; Entity_Id gnat_pool,
Entity_Id gnat_proc; Node_Id gnat_node)
Entity_Id gnat_pool;
Node_Id gnat_node;
{ {
tree gnu_align = size_int (align / BITS_PER_UNIT); tree gnu_align = size_int (align / BITS_PER_UNIT);
...@@ -1865,13 +1838,12 @@ build_call_alloc_dealloc ...@@ -1865,13 +1838,12 @@ build_call_alloc_dealloc
the storage pool to use. */ the storage pool to use. */
tree tree
build_allocator (type, init, result_type, gnat_proc, gnat_pool, gnat_node) build_allocator (tree type,
tree type; tree init,
tree init; tree result_type,
tree result_type; Entity_Id gnat_proc,
Entity_Id gnat_proc; Entity_Id gnat_pool,
Entity_Id gnat_pool; Node_Id gnat_node)
Node_Id gnat_node;
{ {
tree size = TYPE_SIZE_UNIT (type); tree size = TYPE_SIZE_UNIT (type);
tree result; tree result;
...@@ -2030,9 +2002,7 @@ build_allocator (type, init, result_type, gnat_proc, gnat_pool, gnat_node) ...@@ -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. */ GNAT_FORMAL is how we find the descriptor record. */
tree tree
fill_vms_descriptor (expr, gnat_formal) fill_vms_descriptor (tree expr, Entity_Id gnat_formal)
tree expr;
Entity_Id gnat_formal;
{ {
tree record_type = TREE_TYPE (TREE_TYPE (get_gnu_tree (gnat_formal))); tree record_type = TREE_TYPE (TREE_TYPE (get_gnu_tree (gnat_formal)));
tree field; tree field;
...@@ -2059,8 +2029,7 @@ fill_vms_descriptor (expr, gnat_formal) ...@@ -2059,8 +2029,7 @@ fill_vms_descriptor (expr, gnat_formal)
should not be allocated in a register. Returns true if successful. */ should not be allocated in a register. Returns true if successful. */
bool bool
gnat_mark_addressable (expr_node) gnat_mark_addressable (tree expr_node)
tree expr_node;
{ {
while (1) while (1)
switch (TREE_CODE (expr_node)) switch (TREE_CODE (expr_node))
......
...@@ -314,7 +314,7 @@ find_values_to_profile (unsigned *n_values, struct histogram_value **values) ...@@ -314,7 +314,7 @@ find_values_to_profile (unsigned *n_values, struct histogram_value **values)
we would have to be very careful here. */ we would have to be very careful here. */
bool bool
value_profile_transformations () value_profile_transformations (void)
{ {
rtx insn, next; rtx insn, next;
int changed = false; int changed = false;
......
...@@ -66,22 +66,18 @@ struct web_entry ...@@ -66,22 +66,18 @@ struct web_entry
rtx reg; rtx reg;
}; };
static struct web_entry *unionfind_root PARAMS ((struct web_entry *)); static struct web_entry *unionfind_root (struct web_entry *);
static void unionfind_union PARAMS ((struct web_entry *, static void unionfind_union (struct web_entry *, struct web_entry *);
struct web_entry *)); static void union_defs (struct df *, struct ref *, struct web_entry *,
static void union_defs PARAMS ((struct df *, struct ref *, struct web_entry *);
struct web_entry *, static rtx entry_register (struct web_entry *, struct ref *, char *, char *);
struct web_entry *)); static void replace_ref (struct ref *, rtx);
static rtx entry_register PARAMS ((struct web_entry *, static int mark_addressof (rtx *, void *);
struct ref *, char *, char *));
static void replace_ref PARAMS ((struct ref *, rtx));
static int mark_addressof PARAMS ((rtx *, void *));
/* Find the root of unionfind tree (the representative of set). */ /* Find the root of unionfind tree (the representative of set). */
static struct web_entry * static struct web_entry *
unionfind_root (element) unionfind_root (struct web_entry *element)
struct web_entry *element;
{ {
struct web_entry *element1 = element, *element2; struct web_entry *element1 = element, *element2;
...@@ -99,8 +95,7 @@ unionfind_root (element) ...@@ -99,8 +95,7 @@ unionfind_root (element)
/* Union sets. */ /* Union sets. */
static void static void
unionfind_union (first, second) unionfind_union (struct web_entry *first, struct web_entry *second)
struct web_entry *first, *second;
{ {
first = unionfind_root (first); first = unionfind_root (first);
second = unionfind_root (second); second = unionfind_root (second);
...@@ -113,11 +108,8 @@ unionfind_union (first, second) ...@@ -113,11 +108,8 @@ unionfind_union (first, second)
register, union them. */ register, union them. */
static void static void
union_defs (df, use, def_entry, use_entry) union_defs (struct df *df, struct ref *use, struct web_entry *def_entry,
struct df *df; struct web_entry *use_entry)
struct ref *use;
struct web_entry *def_entry;
struct web_entry *use_entry;
{ {
rtx insn = DF_REF_INSN (use); rtx insn = DF_REF_INSN (use);
struct df_link *link = DF_REF_CHAIN (use); struct df_link *link = DF_REF_CHAIN (use);
...@@ -179,11 +171,8 @@ union_defs (df, use, def_entry, use_entry) ...@@ -179,11 +171,8 @@ union_defs (df, use, def_entry, use_entry)
/* Find the corresponding register for the given entry. */ /* Find the corresponding register for the given entry. */
static rtx static rtx
entry_register (entry, ref, used, use_addressof) entry_register (struct web_entry *entry, struct ref *ref, char *used,
struct web_entry *entry; char *use_addressof)
struct ref *ref;
char *used;
char *use_addressof;
{ {
struct web_entry *root; struct web_entry *root;
rtx reg, newreg; rtx reg, newreg;
...@@ -235,9 +224,7 @@ entry_register (entry, ref, used, use_addressof) ...@@ -235,9 +224,7 @@ entry_register (entry, ref, used, use_addressof)
/* Replace the reference by REG. */ /* Replace the reference by REG. */
static void static void
replace_ref (ref, reg) replace_ref (struct ref *ref, rtx reg)
struct ref *ref;
rtx reg;
{ {
rtx oldreg = DF_REF_REAL_REG (ref); rtx oldreg = DF_REF_REAL_REG (ref);
rtx *loc = DF_REF_REAL_LOC (ref); rtx *loc = DF_REF_REAL_LOC (ref);
...@@ -253,9 +240,7 @@ replace_ref (ref, reg) ...@@ -253,9 +240,7 @@ replace_ref (ref, reg)
/* Mark each pseudo whose address is taken. */ /* Mark each pseudo whose address is taken. */
static int static int
mark_addressof (rtl, data) mark_addressof (rtx *rtl, void *data)
rtx *rtl;
void *data;
{ {
if (!*rtl) if (!*rtl)
return 0; return 0;
...@@ -268,7 +253,7 @@ mark_addressof (rtl, data) ...@@ -268,7 +253,7 @@ mark_addressof (rtl, data)
/* Main entry point. */ /* Main entry point. */
void void
web_main () web_main (void)
{ {
struct df *df; struct df *df;
struct web_entry *def_entry; 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