diff options
author | kcook <kcook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-31 01:08:43 +0000 |
---|---|---|
committer | kcook <kcook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-31 01:08:43 +0000 |
commit | 6f2c2693f7ca65a692e88bcc8f74ca73e4462c37 (patch) | |
tree | ee92d17300eb95b03e9b66263bbb9e1407851aa2 | |
parent | 84b5e3f34b717e4431cde5f4e24c1dda7d548a42 (diff) | |
download | gcc-6f2c2693f7ca65a692e88bcc8f74ca73e4462c37.tar.gz |
C90 prototype updates.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73113 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ada/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ada/adadecode.c | 26 | ||||
-rw-r--r-- | gcc/ada/adaint.c | 21 | ||||
-rw-r--r-- | gcc/ada/argv.c | 18 | ||||
-rw-r--r-- | gcc/ada/aux-io.c | 29 | ||||
-rw-r--r-- | gcc/ada/cal.c | 2 | ||||
-rw-r--r-- | gcc/ada/cio.c | 19 | ||||
-rw-r--r-- | gcc/ada/cstreams.c | 12 | ||||
-rw-r--r-- | gcc/ada/ctrl_c.c | 4 | ||||
-rw-r--r-- | gcc/ada/cuintp.c | 4 | ||||
-rw-r--r-- | gcc/ada/decl.c | 251 | ||||
-rw-r--r-- | gcc/ada/errno.c | 5 | ||||
-rw-r--r-- | gcc/ada/exit.c | 3 | ||||
-rw-r--r-- | gcc/ada/expect.c | 8 | ||||
-rw-r--r-- | gcc/ada/final.c | 2 | ||||
-rw-r--r-- | gcc/ada/gmem.c | 5 | ||||
-rw-r--r-- | gcc/ada/gnatbl.c | 17 | ||||
-rw-r--r-- | gcc/ada/init.c | 220 | ||||
-rw-r--r-- | gcc/ada/misc.c | 6 | ||||
-rw-r--r-- | gcc/ada/mkdir.c | 3 | ||||
-rw-r--r-- | gcc/ada/raise.c | 105 | ||||
-rw-r--r-- | gcc/ada/socket.c | 41 | ||||
-rw-r--r-- | gcc/ada/sysdep.c | 106 | ||||
-rw-r--r-- | gcc/ada/targtyps.c | 38 | ||||
-rw-r--r-- | gcc/ada/tb-alvms.c | 11 | ||||
-rw-r--r-- | gcc/ada/tb-alvxw.c | 92 | ||||
-rw-r--r-- | gcc/ada/tracebak.c | 17 | ||||
-rw-r--r-- | gcc/ada/trans.c | 221 | ||||
-rw-r--r-- | gcc/ada/utils.c | 304 | ||||
-rw-r--r-- | gcc/ada/utils2.c | 139 | ||||
-rw-r--r-- | gcc/value-prof.c | 2 | ||||
-rw-r--r-- | gcc/web.c | 47 |
33 files changed, 701 insertions, 1092 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2d623a38627..822ff441dbf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +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. diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d34a2a45de3..40e7313edfd 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +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: diff --git a/gcc/ada/adadecode.c b/gcc/ada/adadecode.c index 928b838ab19..8f685126d14 100644 --- a/gcc/ada/adadecode.c +++ b/gcc/ada/adadecode.c @@ -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]; diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index c5a1cddced6..cbaf1d7dff3 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -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); diff --git a/gcc/ada/argv.c b/gcc/ada/argv.c index d0ba12d9ee5..b62011c2bef 100644 --- a/gcc/ada/argv.c +++ b/gcc/ada/argv.c @@ -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])); } diff --git a/gcc/ada/aux-io.c b/gcc/ada/aux-io.c index 8185f2e033b..333485d6309 100644 --- a/gcc/ada/aux-io.c +++ b/gcc/ada/aux-io.c @@ -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); } diff --git a/gcc/ada/cal.c b/gcc/ada/cal.c index 31d39834afc..7f136d6ff12 100644 --- a/gcc/ada/cal.c +++ b/gcc/ada/cal.c @@ -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); } diff --git a/gcc/ada/cio.c b/gcc/ada/cio.c index 1316455c86a..8e4c7cba596 100644 --- a/gcc/ada/cio.c +++ b/gcc/ada/cio.c @@ -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); } diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c index f56cfff44bd..6db356b50a6 100644 --- a/gcc/ada/cstreams.c +++ b/gcc/ada/cstreams.c @@ -76,29 +76,25 @@ #endif int -__gnat_feof (stream) - FILE *stream; +__gnat_feof (FILE *stream) { return (feof (stream)); } int -__gnat_ferror (stream) - FILE *stream; +__gnat_ferror (FILE *stream) { return (ferror (stream)); } int -__gnat_fileno (stream) - FILE *stream; +__gnat_fileno (FILE *stream) { return (fileno (stream)); } int -__gnat_is_regular_file_fd (fd) - int fd; +__gnat_is_regular_file_fd (int fd) { int ret; struct stat statbuf; diff --git a/gcc/ada/ctrl_c.c b/gcc/ada/ctrl_c.c index 22d00667275..20dd8811007 100644 --- a/gcc/ada/ctrl_c.c +++ b/gcc/ada/ctrl_c.c @@ -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 diff --git a/gcc/ada/cuintp.c b/gcc/ada/cuintp.c index 80ed5b588bf..2c8967af8bf 100644 --- a/gcc/ada/cuintp.c +++ b/gcc/ada/cuintp.c @@ -57,9 +57,7 @@ resulting node. */ tree -UI_To_gnu (Input, type) - Uint Input; - tree type; +UI_To_gnu (Uint Input, tree type) { tree gnu_ret; diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index d01074e9b0a..028443fd91b 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -82,42 +82,34 @@ static struct incomplete Entity_Id full_type; } *defer_incomplete_list = 0; -static tree substitution_list PARAMS ((Entity_Id, Entity_Id, - tree, int)); -static int allocatable_size_p PARAMS ((tree, int)); -static struct attrib *build_attr_list PARAMS ((Entity_Id)); -static tree elaborate_expression PARAMS ((Node_Id, Entity_Id, tree, - int, int, int)); -static int is_variable_size PARAMS ((tree)); -static tree elaborate_expression_1 PARAMS ((Node_Id, Entity_Id, tree, - tree, int, int)); -static tree make_packable_type PARAMS ((tree)); -static tree maybe_pad_type PARAMS ((tree, tree, unsigned int, - Entity_Id, const char *, int, - int, int)); -static tree gnat_to_gnu_field PARAMS ((Entity_Id, tree, int, int)); -static void components_to_record PARAMS ((tree, Node_Id, tree, int, - int, tree *, int, int)); -static int compare_field_bitpos PARAMS ((const PTR, const PTR)); -static Uint annotate_value PARAMS ((tree)); -static void annotate_rep PARAMS ((Entity_Id, tree)); -static tree compute_field_positions PARAMS ((tree, tree, tree, tree, - unsigned int)); -static tree validate_size PARAMS ((Uint, tree, Entity_Id, - enum tree_code, int, int)); -static void set_rm_size PARAMS ((Uint, tree, Entity_Id)); -static tree make_type_from_size PARAMS ((tree, tree, int)); -static unsigned int validate_alignment PARAMS ((Uint, Entity_Id, - unsigned int)); -static void check_ok_for_atomic PARAMS ((tree, Entity_Id, int)); +static tree substitution_list (Entity_Id, Entity_Id, tree, int); +static int allocatable_size_p (tree, int); +static struct attrib *build_attr_list (Entity_Id); +static tree elaborate_expression (Node_Id, Entity_Id, tree, int, int, int); +static int is_variable_size (tree); +static tree elaborate_expression_1 (Node_Id, Entity_Id, tree, tree, int, int); +static tree make_packable_type (tree); +static tree maybe_pad_type (tree, tree, unsigned int, Entity_Id, const char *, + int, int, int); +static tree gnat_to_gnu_field (Entity_Id, tree, int, int); +static void components_to_record (tree, Node_Id, tree, int, int, tree *, + int, int); +static int compare_field_bitpos (const PTR, const PTR); +static Uint annotate_value (tree); +static void annotate_rep (Entity_Id, tree); +static tree compute_field_positions (tree, tree, tree, tree, unsigned int); +static tree validate_size (Uint, tree, Entity_Id, enum tree_code, int, int); +static void set_rm_size (Uint, tree, Entity_Id); +static tree make_type_from_size (tree, tree, int); +static unsigned int validate_alignment (Uint, Entity_Id, unsigned int); +static void check_ok_for_atomic (tree, Entity_Id, int); /* Given GNAT_ENTITY, an entity in the incoming GNAT tree, return a GCC type corresponding to that entity. GNAT_ENTITY is assumed to refer to an Ada type. */ tree -gnat_to_gnu_type (gnat_entity) - Entity_Id gnat_entity; +gnat_to_gnu_type (Entity_Id gnat_entity) { tree gnu_decl; @@ -146,10 +138,7 @@ gnat_to_gnu_type (gnat_entity) the code. */ tree -gnat_to_gnu_entity (gnat_entity, gnu_expr, definition) - Entity_Id gnat_entity; - tree gnu_expr; - int definition; +gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) { tree gnu_entity_id; tree gnu_type = 0; @@ -4037,8 +4026,7 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition) be elaborated at the point of its definition, but do nothing else. */ void -elaborate_entity (gnat_entity) - Entity_Id gnat_entity; +elaborate_entity (Entity_Id gnat_entity) { switch (Ekind (gnat_entity)) { @@ -4109,8 +4097,7 @@ elaborate_entity (gnat_entity) any entities on its entity chain similarly. */ void -mark_out_of_scope (gnat_entity) - Entity_Id gnat_entity; +mark_out_of_scope (Entity_Id gnat_entity) { Entity_Id gnat_sub_entity; unsigned int kind = Ekind (gnat_entity); @@ -4153,11 +4140,10 @@ mark_out_of_scope (gnat_entity) DEFINITION is as in gnat_to_gnu_entity. */ static tree -substitution_list (gnat_subtype, gnat_type, gnu_list, definition) - Entity_Id gnat_subtype; - Entity_Id gnat_type; - tree gnu_list; - int definition; +substitution_list (Entity_Id gnat_subtype, + Entity_Id gnat_type, + tree gnu_list, + int definition) { Entity_Id gnat_discrim; Node_Id gnat_value; @@ -4191,7 +4177,7 @@ static GTY((length ("max_gnat_nodes"))) tree * dummy_node_table; /* Initialize the above table. */ void -init_dummy_type () +init_dummy_type (void) { Node_Id gnat_node; @@ -4206,8 +4192,7 @@ init_dummy_type () /* Make a dummy type corresponding to GNAT_TYPE. */ tree -make_dummy_type (gnat_type) - Entity_Id gnat_type; +make_dummy_type (Entity_Id gnat_type) { Entity_Id gnat_underlying; tree gnu_type; @@ -4253,9 +4238,7 @@ make_dummy_type (gnat_type) done with a static allocation. */ static int -allocatable_size_p (gnu_size, static_p) - tree gnu_size; - int static_p; +allocatable_size_p (tree gnu_size, int static_p) { HOST_WIDE_INT our_size; @@ -4279,8 +4262,7 @@ allocatable_size_p (gnu_size, static_p) /* Return a list of attributes for GNAT_ENTITY, if any. */ static struct attrib * -build_attr_list (gnat_entity) - Entity_Id gnat_entity; +build_attr_list (Entity_Id gnat_entity) { struct attrib *attr_list = 0; Node_Id gnat_temp; @@ -4352,8 +4334,7 @@ build_attr_list (gnat_entity) /* Get the unpadded version of a GNAT type. */ tree -get_unpadded_type (gnat_entity) - Entity_Id gnat_entity; +get_unpadded_type (Entity_Id gnat_entity) { tree type = gnat_to_gnu_type (gnat_entity); @@ -4366,9 +4347,7 @@ get_unpadded_type (gnat_entity) /* Called when we need to protect a variable object using a save_expr. */ tree -maybe_variable (gnu_operand, gnat_node) - tree gnu_operand; - Node_Id gnat_node; +maybe_variable (tree gnu_operand, Node_Id gnat_node) { if (TREE_CONSTANT (gnu_operand) || TREE_READONLY (gnu_operand) || TREE_CODE (gnu_operand) == SAVE_EXPR @@ -4397,14 +4376,12 @@ maybe_variable (gnu_operand, gnat_node) purposes even if it isn't needed for code generation. */ static tree -elaborate_expression (gnat_expr, gnat_entity, gnu_name, definition, - need_value, need_debug) - Node_Id gnat_expr; - Entity_Id gnat_entity; - tree gnu_name; - int definition; - int need_value; - int need_debug; +elaborate_expression (Node_Id gnat_expr, + Entity_Id gnat_entity, + tree gnu_name, + int definition, + int need_value, + int need_debug) { tree gnu_expr; @@ -4439,14 +4416,12 @@ elaborate_expression (gnat_expr, gnat_entity, gnu_name, definition, /* Similar, but take a GNU expression. */ static tree -elaborate_expression_1 (gnat_expr, gnat_entity, gnu_expr, gnu_name, definition, - need_debug) - Node_Id gnat_expr; - Entity_Id gnat_entity; - tree gnu_expr; - tree gnu_name; - int definition; - int need_debug; +elaborate_expression_1 (Node_Id gnat_expr, + Entity_Id gnat_entity, + tree gnu_expr, + tree gnu_name, + int definition, + int need_debug) { tree gnu_decl = 0; /* Strip any conversions to see if the expression is a readonly variable. @@ -4514,10 +4489,7 @@ elaborate_expression_1 (gnat_expr, gnat_entity, gnu_expr, gnu_name, definition, position so that it is aligned to ALIGN bits and is SIZE bytes long. */ tree -make_aligning_type (type, align, size) - tree type; - int align; - tree size; +make_aligning_type (tree type, int align, tree size) { tree record_type = make_node (RECORD_TYPE); tree place = build (PLACEHOLDER_EXPR, record_type); @@ -4568,8 +4540,7 @@ make_aligning_type (type, align, size) return the new type. If not, return the original type. */ static tree -make_packable_type (type) - tree type; +make_packable_type (tree type) { tree new_type = make_node (TREE_CODE (type)); tree field_list = NULL_TREE; @@ -4645,16 +4616,14 @@ make_packable_type (type) type. */ static tree -maybe_pad_type (type, size, align, gnat_entity, name_trailer, - is_user_type, definition, same_rm_size) - tree type; - tree size; - unsigned int align; - Entity_Id gnat_entity; - const char *name_trailer; - int is_user_type; - int definition; - int same_rm_size; +maybe_pad_type (tree type, + tree size, + unsigned int align, + Entity_Id gnat_entity, + const char *name_trailer, + int is_user_type, + int definition, + int same_rm_size) { tree orig_size = TYPE_SIZE (type); tree record; @@ -4830,9 +4799,7 @@ maybe_pad_type (type, size, align, gnat_entity, name_trailer, the value passed against the list of choices. */ tree -choices_to_gnu (operand, choices) - tree operand; - Node_Id choices; +choices_to_gnu (tree operand, Node_Id choices) { Node_Id choice; Node_Id gnat_temp; @@ -4924,11 +4891,10 @@ choices_to_gnu (operand, choices) DEFINITION is nonzero if this field is for a record being defined. */ static tree -gnat_to_gnu_field (gnat_field, gnu_record_type, packed, definition) - Entity_Id gnat_field; - tree gnu_record_type; - int packed; - int definition; +gnat_to_gnu_field (Entity_Id gnat_field, + tree gnu_record_type, + int packed, + int definition) { tree gnu_field_id = get_entity_name (gnat_field); tree gnu_field_type = gnat_to_gnu_type (Etype (gnat_field)); @@ -5173,8 +5139,7 @@ gnat_to_gnu_field (gnat_field, gnu_record_type, packed, definition) of variable size or is a record that has a field such a field. */ static int -is_variable_size (type) - tree type; +is_variable_size (tree type) { tree field; @@ -5229,16 +5194,14 @@ is_variable_size (type) fields of the record and then the record type is finished. */ static void -components_to_record (gnu_record_type, component_list, gnu_field_list, packed, - definition, p_gnu_rep_list, cancel_alignment, all_rep) - tree gnu_record_type; - Node_Id component_list; - tree gnu_field_list; - int packed; - int definition; - tree *p_gnu_rep_list; - int cancel_alignment; - int all_rep; +components_to_record (tree gnu_record_type, + Node_Id component_list, + tree gnu_field_list, + int packed, + int definition, + tree *p_gnu_rep_list, + int cancel_alignment, + int all_rep) { Node_Id component_decl; Entity_Id gnat_field; @@ -5502,9 +5465,7 @@ components_to_record (gnu_record_type, component_list, gnu_field_list, packed, bit positions and ordinals of the two fields. */ static int -compare_field_bitpos (rt1, rt2) - const PTR rt1; - const PTR rt2; +compare_field_bitpos (const PTR rt1, const PTR rt2) { tree *t1 = (tree *) rt1; tree *t2 = (tree *) rt2; @@ -5524,8 +5485,7 @@ compare_field_bitpos (rt1, rt2) in the GNAT tree. */ static Uint -annotate_value (gnu_size) - tree gnu_size; +annotate_value (tree gnu_size) { int len = TREE_CODE_LENGTH (TREE_CODE (gnu_size)); TCode tcode; @@ -5663,9 +5623,7 @@ annotate_value (gnu_size) used by Gigi. */ static void -annotate_rep (gnat_entity, gnu_type) - Entity_Id gnat_entity; - tree gnu_type; +annotate_rep (Entity_Id gnat_entity, tree gnu_type) { tree gnu_list; tree gnu_entry; @@ -5743,12 +5701,11 @@ annotate_rep (gnat_entity, gnu_type) so far. */ static tree -compute_field_positions (gnu_type, gnu_list, gnu_pos, gnu_bitpos, offset_align) - tree gnu_type; - tree gnu_list; - tree gnu_pos; - tree gnu_bitpos; - unsigned int offset_align; +compute_field_positions (tree gnu_type, + tree gnu_list, + tree gnu_pos, + tree gnu_bitpos, + unsigned int offset_align) { tree gnu_field; tree gnu_result = gnu_list; @@ -5792,13 +5749,12 @@ compute_field_positions (gnu_type, gnu_list, gnu_pos, gnu_bitpos, offset_align) it means that a size of zero should be treated as an unspecified size. */ static tree -validate_size (uint_size, gnu_type, gnat_object, kind, component_p, zero_ok) - Uint uint_size; - tree gnu_type; - Entity_Id gnat_object; - enum tree_code kind; - int component_p; - int zero_ok; +validate_size (Uint uint_size, + tree gnu_type, + Entity_Id gnat_object, + enum tree_code kind, + int component_p, + int zero_ok) { Node_Id gnat_error_node; tree type_size @@ -5911,10 +5867,7 @@ validate_size (uint_size, gnu_type, gnat_object, kind, component_p, zero_ok) routine is only called for types. */ static void -set_rm_size (uint_size, gnu_type, gnat_entity) - Uint uint_size; - tree gnu_type; - Entity_Id gnat_entity; +set_rm_size (Uint uint_size, tree gnu_type, Entity_Id gnat_entity) { /* Only give an error if a Value_Size clause was explicitly given. Otherwise, we'd be duplicating an error on the Size clause. */ @@ -5988,10 +5941,7 @@ set_rm_size (uint_size, gnu_type, gnat_entity) we are making a biased type. */ static tree -make_type_from_size (type, size_tree, biased_p) - tree type; - tree size_tree; - int biased_p; +make_type_from_size (tree type, tree size_tree, int biased_p) { tree new_type; unsigned HOST_WIDE_INT size; @@ -6061,10 +6011,7 @@ make_type_from_size (type, size_tree, biased_p) valid, return it. Otherwise, give an error and return ALIGN. */ static unsigned int -validate_alignment (alignment, gnat_entity, align) - Uint alignment; - Entity_Id gnat_entity; - unsigned int align; +validate_alignment (Uint alignment, Entity_Id gnat_entity, unsigned int align) { Node_Id gnat_error_node = gnat_entity; unsigned int new_align; @@ -6109,10 +6056,7 @@ validate_alignment (alignment, gnat_entity, align) if we require atomic components. */ static void -check_ok_for_atomic (object, gnat_entity, comp_p) - tree object; - Entity_Id gnat_entity; - int comp_p; +check_ok_for_atomic (tree object, Entity_Id gnat_entity, int comp_p) { Node_Id gnat_error_point = gnat_entity; Node_Id gnat_node; @@ -6188,8 +6132,7 @@ check_ok_for_atomic (object, gnat_entity, comp_p) changed. */ tree -gnat_substitute_in_type (t, f, r) - tree t, f, r; +gnat_substitute_in_type (tree t, tree f, tree r) { tree new = t; tree tem; @@ -6410,8 +6353,7 @@ gnat_substitute_in_type (t, f, r) needed to represent the object. */ tree -rm_size (gnu_type) - tree gnu_type; +rm_size (tree gnu_type) { /* For integer types, this is the precision. For record types, we store the size explicitly. For other types, this is just the size. */ @@ -6440,9 +6382,7 @@ rm_size (gnu_type) and the specified suffix. */ tree -create_concat_name (gnat_entity, suffix) - Entity_Id gnat_entity; - const char *suffix; +create_concat_name (Entity_Id gnat_entity, const char *suffix) { const char *str = (suffix == 0 ? "" : suffix); String_Template temp = {1, strlen (str)}; @@ -6480,8 +6420,7 @@ create_concat_name (gnat_entity, suffix) Otherwise, return the name. */ tree -get_entity_name (gnat_entity) - Entity_Id gnat_entity; +get_entity_name (Entity_Id gnat_entity) { Get_Encoded_Name (gnat_entity); return get_identifier (Name_Buffer); @@ -6492,9 +6431,7 @@ get_entity_name (gnat_entity) the name in GNU_ID and SUFFIX. */ tree -concat_id_with_name (gnu_id, suffix) - tree gnu_id; - const char *suffix; +concat_id_with_name (tree gnu_id, const char *suffix) { int len = IDENTIFIER_LENGTH (gnu_id); diff --git a/gcc/ada/errno.c b/gcc/ada/errno.c index c1b8ec9485a..112e7be2d29 100644 --- a/gcc/ada/errno.c +++ b/gcc/ada/errno.c @@ -42,14 +42,13 @@ #include <errno.h> int -__get_errno() +__get_errno(void) { return errno; } void -__set_errno(err) - int err; +__set_errno(int err) { errno = err; } diff --git a/gcc/ada/exit.c b/gcc/ada/exit.c index dbb54a1a919..72ce28e8405 100644 --- a/gcc/ada/exit.c +++ b/gcc/ada/exit.c @@ -50,8 +50,7 @@ int gnat_exit_status = 0; void -__gnat_set_exit_status (i) - int i; +__gnat_set_exit_status (int i) { gnat_exit_status = i; } diff --git a/gcc/ada/expect.c b/gcc/ada/expect.c index 3a86ffdf87c..54952268517 100644 --- a/gcc/ada/expect.c +++ b/gcc/ada/expect.c @@ -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; } diff --git a/gcc/ada/final.c b/gcc/ada/final.c index 0fda97b98ee..c17c6769b52 100644 --- a/gcc/ada/final.c +++ b/gcc/ada/final.c @@ -38,6 +38,6 @@ extern void __gnat_finalize (void); where finalization is required. */ void -__gnat_finalize () +__gnat_finalize (void) { } diff --git a/gcc/ada/gmem.c b/gcc/ada/gmem.c index c21fa47c8ff..002f78f77be 100644 --- a/gcc/ada/gmem.c +++ b/gcc/ada/gmem.c @@ -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; diff --git a/gcc/ada/gnatbl.c b/gcc/ada/gnatbl.c index 72f85169fd8..de75b3374b0 100644 --- a/gcc/ada/gnatbl.c +++ b/gcc/ada/gnatbl.c @@ -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; diff --git a/gcc/ada/init.c b/gcc/ada/init.c index c23819d7e08..ac9abca545b 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -71,28 +71,28 @@ extern struct Exception_Data tasking_error; extern struct Exception_Data _abort_signal; #define Lock_Task system__soft_links__lock_task -extern void (*Lock_Task) PARAMS ((void)); +extern void (*Lock_Task) (void); #define Unlock_Task system__soft_links__unlock_task -extern void (*Unlock_Task) PARAMS ((void)); +extern void (*Unlock_Task) (void); #define Get_Machine_State_Addr \ system__soft_links__get_machine_state_addr -extern struct Machine_State *(*Get_Machine_State_Addr) PARAMS ((void)); +extern struct Machine_State *(*Get_Machine_State_Addr) (void); #define Check_Abort_Status \ system__soft_links__check_abort_status -extern int (*Check_Abort_Status) PARAMS ((void)); +extern int (*Check_Abort_Status) (void); #define Raise_From_Signal_Handler \ ada__exceptions__raise_from_signal_handler -extern void Raise_From_Signal_Handler PARAMS ((struct Exception_Data *, - const char *)); +extern void Raise_From_Signal_Handler (struct Exception_Data *, const char *); #define Propagate_Signal_Exception \ __gnat_propagate_sig_exc -extern void Propagate_Signal_Exception - PARAMS ((struct Machine_State *, struct Exception_Data *, const char *)); +extern void Propagate_Signal_Exception (struct Machine_State *, + struct Exception_Data *, + const char *); /* Copies of global values computed by the binder */ int __gl_main_priority = -1; @@ -134,8 +134,7 @@ char __gnat_get_interrupt_state (int); 's' Interrupt_State pragma set state to System */ char -__gnat_get_interrupt_state (intrup) - int intrup; +__gnat_get_interrupt_state (int intrup) { if (intrup >= __gl_num_interrupt_states) return 'n'; @@ -156,30 +155,18 @@ __gnat_get_interrupt_state (intrup) boundaries like this are not handled correctly in all systems. */ void -__gnat_set_globals (main_priority, - time_slice_val, - wc_encoding, - locking_policy, - queuing_policy, - task_dispatching_policy, - restrictions, - interrupt_states, - num_interrupt_states, - unreserve_all_interrupts, - exception_tracebacks, - zero_cost_exceptions) - int main_priority; - int time_slice_val; - char wc_encoding; - char locking_policy; - char queuing_policy; - char task_dispatching_policy; - char *restrictions; - char *interrupt_states; - int num_interrupt_states; - int unreserve_all_interrupts; - int exception_tracebacks; - int zero_cost_exceptions; +__gnat_set_globals (int main_priority, + int time_slice_val, + char wc_encoding, + char locking_policy, + char queuing_policy, + char task_dispatching_policy, + char *restrictions, + char *interrupt_states, + int num_interrupt_states, + int unreserve_all_interrupts, + int exception_tracebacks, + int zero_cost_exceptions) { static int already_called = 0; @@ -288,22 +275,20 @@ __gnat_set_globals (main_priority, #ifndef _AIXVERSION_430 -extern int nanosleep PARAMS ((struct timestruc_t *, struct timestruc_t *)); +extern int nanosleep (struct timestruc_t *, struct timestruc_t *); int -nanosleep (Rqtp, Rmtp) - struct timestruc_t *Rqtp, *Rmtp; +nanosleep (struct timestruc_t *Rqtp, struct timestruc_t *Rmtp) { return nsleep (Rqtp, Rmtp); } #endif /* _AIXVERSION_430 */ -static void __gnat_error_handler PARAMS ((int)); +static void __gnat_error_handler (int); static void -__gnat_error_handler (sig) - int sig; +__gnat_error_handler (int sig) { struct Exception_Data *exception; const char *msg; @@ -335,7 +320,7 @@ __gnat_error_handler (sig) } void -__gnat_install_handler () +__gnat_install_handler (void) { struct sigaction act; @@ -363,7 +348,7 @@ __gnat_install_handler () } void -__gnat_initialize () +__gnat_initialize (void) { } @@ -380,20 +365,16 @@ __gnat_initialize () #include <signal.h> #include <sys/siginfo.h> -static void __gnat_error_handler PARAMS ((int, siginfo_t *, - struct sigcontext *)); -extern char *__gnat_get_code_loc PARAMS ((struct sigcontext *)); -extern void __gnat_enter_handler PARAMS ((struct sigcontext *, char *)); -extern size_t __gnat_machine_state_length PARAMS ((void)); +static void __gnat_error_handler (int, siginfo_t *, struct sigcontext *); +extern char *__gnat_get_code_loc (struct sigcontext *); +extern void __gnat_enter_handler (struct sigcontext *, char *); +extern size_t __gnat_machine_state_length (void); -extern long exc_lookup_gp PARAMS ((char *)); -extern void exc_resume PARAMS ((struct sigcontext *)); +extern long exc_lookup_gp (char *); +extern void exc_resume (struct sigcontext *); static void -__gnat_error_handler (sig, sip, context) - int sig; - siginfo_t *sip; - struct sigcontext *context; +__gnat_error_handler (int sig, siginfo_t *sip, struct sigcontext *context) { struct Exception_Data *exception; static int recurse = 0; @@ -463,7 +444,7 @@ __gnat_error_handler (sig, sip, context) } void -__gnat_install_handler () +__gnat_install_handler (void) { struct sigaction act; @@ -471,7 +452,7 @@ __gnat_install_handler () exceptions. Make sure that the handler isn't interrupted by another signal that might cause a scheduling event! */ - act.sa_handler = (void (*) PARAMS ((int))) __gnat_error_handler; + act.sa_handler = (void (*) (int)) __gnat_error_handler; act.sa_flags = SA_ONSTACK | SA_RESTART | SA_NODEFER | SA_SIGINFO; sigemptyset (&act.sa_mask); @@ -491,7 +472,7 @@ __gnat_install_handler () } void -__gnat_initialize () +__gnat_initialize (void) { } @@ -500,16 +481,13 @@ __gnat_initialize () #define SC_GP 29 char * -__gnat_get_code_loc (context) - struct sigcontext *context; +__gnat_get_code_loc (struct sigcontext *context) { return (char *) context->sc_pc; } void -__gnat_enter_handler (context, pc) - struct sigcontext *context; - char *pc; +__gnat_enter_handler ( struct sigcontext *context, char *pc) { context->sc_pc = (long) pc; context->sc_regs[SC_GP] = exc_lookup_gp (pc); @@ -517,7 +495,7 @@ __gnat_enter_handler (context, pc) } size_t -__gnat_machine_state_length () +__gnat_machine_state_length (void) { return sizeof (struct sigcontext); } @@ -530,11 +508,10 @@ __gnat_machine_state_length () #include <signal.h> -static void __gnat_error_handler PARAMS ((int)); +static void __gnat_error_handler (int); static void -__gnat_error_handler (sig) - int sig; +__gnat_error_handler (int sig) { struct Exception_Data *exception; char *msg; @@ -566,7 +543,7 @@ __gnat_error_handler (sig) } void -__gnat_install_handler () +__gnat_install_handler (void) { struct sigaction act; @@ -609,7 +586,7 @@ __gnat_install_handler () } void -__gnat_initialize () +__gnat_initialize (void) { } @@ -639,11 +616,10 @@ struct Machine_State unsigned long edi; }; -static void __gnat_error_handler PARAMS ((int)); +static void __gnat_error_handler (int); static void -__gnat_error_handler (sig) - int sig; +__gnat_error_handler (int sig) { struct Exception_Data *exception; const char *msg; @@ -731,7 +707,7 @@ __gnat_error_handler (sig) } void -__gnat_install_handler () +__gnat_install_handler (void) { struct sigaction act; @@ -759,7 +735,7 @@ __gnat_install_handler () } void -__gnat_initialize () +__gnat_initialize (void) { } @@ -770,13 +746,12 @@ __gnat_initialize () #elif defined (__MINGW32__) #include <windows.h> -static LONG WINAPI __gnat_error_handler PARAMS ((PEXCEPTION_POINTERS)); +static LONG WINAPI __gnat_error_handler (PEXCEPTION_POINTERS); /* __gnat_initialize (mingw32). */ static LONG WINAPI -__gnat_error_handler (info) - PEXCEPTION_POINTERS info; +__gnat_error_handler (PEXCEPTION_POINTERS info) { static int recurse; struct Exception_Data *exception; @@ -891,14 +866,14 @@ __gnat_error_handler (info) } void -__gnat_install_handler () +__gnat_install_handler (void) { SetUnhandledExceptionFilter (__gnat_error_handler); __gnat_handler_installed = 1; } void -__gnat_initialize () +__gnat_initialize (void) { /* Initialize floating-point coprocessor. This call is needed because @@ -921,11 +896,10 @@ __gnat_initialize () #include <signal.h> -static void __gnat_error_handler PARAMS ((int)); +static void __gnat_error_handler (int); static void -__gnat_error_handler (sig) - int sig; +__gnat_error_handler (int sig) { struct Exception_Data *exception; char *msg; @@ -956,7 +930,7 @@ __gnat_error_handler (sig) } void -__gnat_install_handler () +__gnat_install_handler (void) { struct sigaction act; @@ -982,7 +956,7 @@ __gnat_install_handler () } void -__gnat_initialize () +__gnat_initialize (void) { __gnat_init_float (); } @@ -994,7 +968,7 @@ __gnat_initialize () #elif defined (__Lynx__) void -__gnat_initialize () +__gnat_initialize (void) { __gnat_init_float (); } @@ -1004,7 +978,7 @@ __gnat_initialize () /*********************************/ void -__gnat_install_handler () +__gnat_install_handler (void) { __gnat_handler_installed = 1; } @@ -1016,7 +990,7 @@ __gnat_install_handler () #elif defined (__EMX__) /* OS/2 dependent initialization */ void -__gnat_initialize () +__gnat_initialize (void) { } @@ -1025,7 +999,7 @@ __gnat_initialize () /*********************************/ void -__gnat_install_handler () +__gnat_install_handler (void) { __gnat_handler_installed = 1; } @@ -1052,13 +1026,10 @@ struct Machine_State sigcontext_t context; }; -static void __gnat_error_handler PARAMS ((int, int, sigcontext_t *)); +static void __gnat_error_handler (int, int, sigcontext_t *); static void -__gnat_error_handler (sig, code, sc) - int sig; - int code; - sigcontext_t *sc; +__gnat_error_handler (int sig, int code, sigcontext_t *sc) { struct Machine_State *mstate; struct Exception_Data *exception; @@ -1138,7 +1109,7 @@ __gnat_error_handler (sig, code, sc) } void -__gnat_install_handler () +__gnat_install_handler (void) { struct sigaction act; @@ -1169,7 +1140,7 @@ __gnat_install_handler () } void -__gnat_initialize () +__gnat_initialize (void) { } @@ -1182,12 +1153,10 @@ __gnat_initialize () #include <signal.h> #include <siginfo.h> -static void __gnat_error_handler PARAMS ((int, siginfo_t *)); +static void __gnat_error_handler (int, siginfo_t *); static void -__gnat_error_handler (sig, sip) - int sig; - siginfo_t *sip; +__gnat_error_handler (int sig, siginfo_t *sip) { struct Exception_Data *exception; static int recurse = 0; @@ -1253,7 +1222,7 @@ __gnat_error_handler (sig, sip) } void -__gnat_install_handler () +__gnat_install_handler (void) { struct sigaction act; @@ -1279,7 +1248,7 @@ __gnat_install_handler () } void -__gnat_initialize () +__gnat_initialize (void) { } @@ -1291,7 +1260,7 @@ __gnat_initialize () /* The prehandler actually gets control first on a condition. It swaps the stack pointer and calls the handler (__gnat_error_handler). */ -extern long __gnat_error_prehandler (); +extern long __gnat_error_prehandler (void); extern char *__gnat_error_prehandler_stack; /* Alternate signal stack */ @@ -1329,12 +1298,10 @@ extern struct Exception_Data *Coded_Exception (int); struct descriptor_s {unsigned short len, mbz; char *adr; }; -long __gnat_error_handler PARAMS ((int *, void *)); +long __gnat_error_handler (int *, void *); long -__gnat_error_handler (sigargs, mechargs) - int *sigargs; - void *mechargs; +__gnat_error_handler (int *sigargs, void *mechargs) { struct Exception_Data *exception = 0; char *msg = ""; @@ -1470,7 +1437,7 @@ __gnat_error_handler (sigargs, mechargs) } void -__gnat_install_handler () +__gnat_install_handler (void) { long prvhnd; char *c; @@ -1485,7 +1452,7 @@ __gnat_install_handler () } void -__gnat_initialize() +__gnat_initialize(void) { } @@ -1508,10 +1475,10 @@ static void __gnat_error_handler (int, int, struct sigcontext *); /* getpid is used by s-parint.adb, but is not defined by VxWorks, except on Alpha VxWorks */ -extern long getpid PARAMS ((void)); +extern long getpid (void); long -getpid () +getpid (void) { return taskIdSelf (); } @@ -1519,17 +1486,13 @@ getpid () /* This is needed by the GNAT run time to handle Vxworks interrupts */ int -__gnat_inum_to_ivec (num) - int num; +__gnat_inum_to_ivec (int num) { return INUM_TO_IVEC (num); } static void -__gnat_error_handler (sig, code, sc) - int sig; - int code; - struct sigcontext *sc; +__gnat_error_handler (int sig, int code, struct sigcontext *sc) { struct Exception_Data *exception; sigset_t mask; @@ -1576,7 +1539,7 @@ __gnat_error_handler (sig, code, sc) } void -__gnat_install_handler () +__gnat_install_handler (void) { struct sigaction act; @@ -1601,7 +1564,7 @@ __gnat_install_handler () #define HAVE_GNAT_INIT_FLOAT void -__gnat_init_float () +__gnat_init_float (void) { /* Disable overflow/underflow exceptions on the PPC processor, this is needed to get correct Ada semantic. */ @@ -1631,7 +1594,7 @@ __gnat_init_float () } void -__gnat_initialize () +__gnat_initialize (void) { __gnat_init_float (); @@ -1661,8 +1624,7 @@ __gnat_initialize () #include <unistd.h> static void -__gnat_error_handler (sig) - int sig; +__gnat_error_handler (int sig) { struct Exception_Data *exception; const char *msg; @@ -1694,7 +1656,7 @@ __gnat_error_handler (sig) } void -__gnat_install_handler() +__gnat_install_handler(void) { struct sigaction act; @@ -1714,7 +1676,7 @@ __gnat_install_handler() } void -__gnat_initialize () +__gnat_initialize (void) { __gnat_install_handler (); __gnat_init_float (); @@ -1726,12 +1688,12 @@ __gnat_initialize () #elif defined(__rtems__) -extern void __gnat_install_handler (); +extern void __gnat_install_handler (void); /* For RTEMS, each bsp will provide a custom __gnat_install_handler (). */ void -__gnat_initialize () +__gnat_initialize (void) { __gnat_install_handler (); } @@ -1742,12 +1704,12 @@ __gnat_initialize () #elif defined(__rtems__) -extern void __gnat_install_handler (); +extern void __gnat_install_handler (void); /* For RTEMS, each bsp will provide a custom __gnat_install_handler (). */ void -__gnat_initialize () +__gnat_initialize (void) { __gnat_install_handler (); } @@ -1762,7 +1724,7 @@ __gnat_initialize () /***************************************/ void -__gnat_initialize () +__gnat_initialize (void) { } @@ -1771,7 +1733,7 @@ __gnat_initialize () /********************************************/ void -__gnat_install_handler () +__gnat_install_handler (void) { __gnat_handler_installed = 1; } @@ -1792,7 +1754,7 @@ __gnat_install_handler () #define HAVE_GNAT_INIT_FLOAT void -__gnat_init_float () +__gnat_init_float (void) { #if defined (__i386__) || defined (i386) @@ -1809,7 +1771,7 @@ __gnat_init_float () /* All targets without a specific __gnat_init_float will use an empty one */ void -__gnat_init_float () +__gnat_init_float (void) { } #endif diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c index 8d541e4d0b9..d2af6f2137c 100644 --- a/gcc/ada/misc.c +++ b/gcc/ada/misc.c @@ -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 diff --git a/gcc/ada/mkdir.c b/gcc/ada/mkdir.c index 2501461f9f0..ce08d9a0601 100644 --- a/gcc/ada/mkdir.c +++ b/gcc/ada/mkdir.c @@ -48,8 +48,7 @@ /* This function provides a portable binding to the mkdir function. */ int -__gnat_mkdir (dir_name) - char *dir_name; +__gnat_mkdir (char *dir_name) { #if defined (_WIN32) || defined (__vxworks) return mkdir (dir_name); diff --git a/gcc/ada/raise.c b/gcc/ada/raise.c index 751c01d70ca..6a399dc3a14 100644 --- a/gcc/ada/raise.c +++ b/gcc/ada/raise.c @@ -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 (); } diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c index f660975fcba..89b8163fada 100644 --- a/gcc/ada/socket.c +++ b/gcc/ada/socket.c @@ -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); } diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index 836f3d53528..be710959015 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -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); } diff --git a/gcc/ada/targtyps.c b/gcc/ada/targtyps.c index 4315c00f023..1ffaf0e9095 100644 --- a/gcc/ada/targtyps.c +++ b/gcc/ada/targtyps.c @@ -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; } diff --git a/gcc/ada/tb-alvms.c b/gcc/ada/tb-alvms.c index ff222603a8f..80cacbc3a7e 100644 --- a/gcc/ada/tb-alvms.c +++ b/gcc/ada/tb-alvms.c @@ -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; diff --git a/gcc/ada/tb-alvxw.c b/gcc/ada/tb-alvxw.c index 0c022aad63b..b86091f7742 100644 --- a/gcc/ada/tb-alvxw.c +++ b/gcc/ada/tb-alvxw.c @@ -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; diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c index 5c9b9f690b4..59ed396d266 100644 --- a/gcc/ada/tracebak.c +++ b/gcc/ada/tracebak.c @@ -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; diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c index 0d4539f9746..8f52bab478f 100644 --- a/gcc/ada/trans.c +++ b/gcc/ada/trans.c @@ -103,24 +103,22 @@ Node_Id error_gnat_node; a return in some functions. See processing for N_Subprogram_Body. */ static GTY(()) tree gnu_return_label_stack; -static tree tree_transform PARAMS((Node_Id)); -static void elaborate_all_entities PARAMS((Node_Id)); -static void process_freeze_entity PARAMS((Node_Id)); -static void process_inlined_subprograms PARAMS((Node_Id)); -static void process_decls PARAMS((List_Id, List_Id, Node_Id, - int, int)); -static tree emit_range_check PARAMS((tree, Node_Id)); -static tree emit_index_check PARAMS((tree, tree, tree, tree)); -static tree emit_check PARAMS((tree, tree, int)); -static tree convert_with_check PARAMS((Entity_Id, tree, - int, int, int)); -static int addressable_p PARAMS((tree)); -static tree assoc_to_constructor PARAMS((Node_Id, tree)); -static tree extract_values PARAMS((tree, tree)); -static tree pos_to_constructor PARAMS((Node_Id, tree, Entity_Id)); -static tree maybe_implicit_deref PARAMS((tree)); -static tree gnat_stabilize_reference_1 PARAMS((tree, int)); -static int build_unit_elab PARAMS((Entity_Id, int, tree)); +static tree tree_transform (Node_Id); +static void elaborate_all_entities (Node_Id); +static void process_freeze_entity (Node_Id); +static void process_inlined_subprograms (Node_Id); +static void process_decls (List_Id, List_Id, Node_Id, int, int); +static tree emit_range_check (tree, Node_Id); +static tree emit_index_check (tree, tree, tree, tree); +static tree emit_check (tree, tree, int); +static tree convert_with_check (Entity_Id, tree, int, int, int); +static int addressable_p (tree); +static tree assoc_to_constructor (Node_Id, tree); +static tree extract_values (tree, tree); +static tree pos_to_constructor (Node_Id, tree, Entity_Id); +static tree maybe_implicit_deref (tree); +static tree gnat_stabilize_reference_1 (tree, int); +static int build_unit_elab (Entity_Id, int, tree); /* Constants for +0.5 and -0.5 for float-to-integer rounding. */ static REAL_VALUE_TYPE dconstp5; @@ -130,27 +128,23 @@ static REAL_VALUE_TYPE dconstmp5; structures and then generates code. */ void -gigi (gnat_root, max_gnat_node, number_name, nodes_ptr, next_node_ptr, - prev_node_ptr, elists_ptr, elmts_ptr, strings_ptr, string_chars_ptr, - list_headers_ptr, number_units, file_info_ptr, standard_integer, - standard_long_long_float, standard_exception_type, gigi_operating_mode) - Node_Id gnat_root; - int max_gnat_node; - int number_name; - struct Node *nodes_ptr; - Node_Id *next_node_ptr; - Node_Id *prev_node_ptr; - struct Elist_Header *elists_ptr; - struct Elmt_Item *elmts_ptr; - struct String_Entry *strings_ptr; - Char_Code *string_chars_ptr; - struct List_Header *list_headers_ptr; - Int number_units ATTRIBUTE_UNUSED; - char *file_info_ptr ATTRIBUTE_UNUSED; - Entity_Id standard_integer; - Entity_Id standard_long_long_float; - Entity_Id standard_exception_type; - Int gigi_operating_mode; +gigi (Node_Id gnat_root, + int max_gnat_node, + int number_name, + struct Node *nodes_ptr, + Node_Id *next_node_ptr, + Node_Id *prev_node_ptr, + struct Elist_Header *elists_ptr, + struct Elmt_Item *elmts_ptr, + struct String_Entry *strings_ptr, + Char_Code *string_chars_ptr, + struct List_Header *list_headers_ptr, + Int number_units ATTRIBUTE_UNUSED, + char *file_info_ptr ATTRIBUTE_UNUSED, + Entity_Id standard_integer, + Entity_Id standard_long_long_float, + Entity_Id standard_exception_type, + Int gigi_operating_mode) { tree gnu_standard_long_long_float; tree gnu_standard_exception_type; @@ -233,8 +227,7 @@ gigi (gnat_root, max_gnat_node, number_name, nodes_ptr, next_node_ptr, part of the tree. */ void -gnat_to_code (gnat_node) - Node_Id gnat_node; +gnat_to_code (Node_Id gnat_node) { tree gnu_root; @@ -259,8 +252,7 @@ gnat_to_code (gnat_node) code. */ tree -gnat_to_gnu (gnat_node) - Node_Id gnat_node; +gnat_to_gnu (Node_Id gnat_node) { tree gnu_root; @@ -286,8 +278,7 @@ gnat_to_gnu (gnat_node) in the above two routines for most purposes. */ static tree -tree_transform (gnat_node) - Node_Id gnat_node; +tree_transform (Node_Id gnat_node) { tree gnu_result = error_mark_node; /* Default to no value. */ tree gnu_result_type = void_type_node; @@ -4156,8 +4147,7 @@ tree_transform (gnat_node) /* GNU_STMT is a statement. We generate code for that statement. */ void -gnat_expand_stmt (gnu_stmt) - tree gnu_stmt; +gnat_expand_stmt (tree gnu_stmt) { set_lineno_from_sloc (TREE_SLOC (gnu_stmt), 1); @@ -4193,8 +4183,7 @@ gnat_expand_stmt (gnu_stmt) information for types in withed units, for ASIS use */ static void -elaborate_all_entities (gnat_node) - Node_Id gnat_node; +elaborate_all_entities (Node_Id gnat_node) { Entity_Id gnat_with_clause, gnat_entity; @@ -4260,8 +4249,7 @@ elaborate_all_entities (gnat_node) /* Do the processing of N_Freeze_Entity, GNAT_NODE. */ static void -process_freeze_entity (gnat_node) - Node_Id gnat_node; +process_freeze_entity (Node_Id gnat_node) { Entity_Id gnat_entity = Entity (gnat_node); tree gnu_old; @@ -4369,8 +4357,7 @@ process_freeze_entity (gnat_node) N_Compilation_Unit. */ static void -process_inlined_subprograms (gnat_node) - Node_Id gnat_node; +process_inlined_subprograms (Node_Id gnat_node) { Entity_Id gnat_entity; Node_Id gnat_body; @@ -4416,10 +4403,11 @@ process_inlined_subprograms (gnat_node) correspond to the public and private parts of a package. */ static void -process_decls (gnat_decls, gnat_decls2, gnat_end_list, pass1p, pass2p) - List_Id gnat_decls, gnat_decls2; - Node_Id gnat_end_list; - int pass1p, pass2p; +process_decls (List_Id gnat_decls, + List_Id gnat_decls2, + Node_Id gnat_end_list, + int pass1p, + int pass2p) { List_Id gnat_decl_array[2]; Node_Id gnat_decl; @@ -4536,9 +4524,7 @@ process_decls (gnat_decls, gnat_decls2, gnat_end_list, pass1p, pass2p) which we have to check. */ static tree -emit_range_check (gnu_expr, gnat_range_type) - tree gnu_expr; - Entity_Id gnat_range_type; +emit_range_check (tree gnu_expr, Entity_Id gnat_range_type) { tree gnu_range_type = get_unpadded_type (gnat_range_type); tree gnu_low = TYPE_MIN_VALUE (gnu_range_type); @@ -4588,11 +4574,10 @@ emit_range_check (gnu_expr, gnat_range_type) subprograms having unconstrained array formal parameters */ static tree -emit_index_check (gnu_array_object, gnu_expr, gnu_low, gnu_high) - tree gnu_array_object; - tree gnu_expr; - tree gnu_low; - tree gnu_high; +emit_index_check (tree gnu_array_object, + tree gnu_expr, + tree gnu_low, + tree gnu_high) { tree gnu_expr_check; @@ -4635,10 +4620,7 @@ emit_index_check (gnu_array_object, gnu_expr, gnu_low, gnu_high) why the exception was raised. */ static tree -emit_check (gnu_cond, gnu_expr, reason) - tree gnu_cond; - tree gnu_expr; - int reason; +emit_check (tree gnu_cond, tree gnu_expr, int reason) { tree gnu_call; tree gnu_result; @@ -4676,12 +4658,11 @@ emit_check (gnu_cond, gnu_expr, reason) truncation; otherwise round. */ static tree -convert_with_check (gnat_type, gnu_expr, overflow_p, range_p, truncate_p) - Entity_Id gnat_type; - tree gnu_expr; - int overflow_p; - int range_p; - int truncate_p; +convert_with_check (Entity_Id gnat_type, + tree gnu_expr, + int overflow_p, + int range_p, + int truncate_p) { tree gnu_type = get_unpadded_type (gnat_type); tree gnu_in_type = TREE_TYPE (gnu_expr); @@ -4820,8 +4801,7 @@ convert_with_check (gnat_type, gnu_expr, overflow_p, range_p, truncate_p) cases. */ static int -addressable_p (gnu_expr) - tree gnu_expr; +addressable_p (tree gnu_expr) { switch (TREE_CODE (gnu_expr)) { @@ -4883,8 +4863,7 @@ addressable_p (gnu_expr) make a GCC type for GNAT_ENTITY and set up the correspondance. */ void -process_type (gnat_entity) - Entity_Id gnat_entity; +process_type (Entity_Id gnat_entity) { tree gnu_old = present_gnu_tree (gnat_entity) ? get_gnu_tree (gnat_entity) : 0; @@ -4979,9 +4958,7 @@ process_type (gnat_entity) Return a CONSTRUCTOR to build the record. */ static tree -assoc_to_constructor (gnat_assoc, gnu_type) - Node_Id gnat_assoc; - tree gnu_type; +assoc_to_constructor (Node_Id gnat_assoc, tree gnu_type) { tree gnu_field, gnu_list, gnu_result; @@ -5030,10 +5007,9 @@ assoc_to_constructor (gnat_assoc, gnu_type) of the array component. It is needed for range checking. */ static tree -pos_to_constructor (gnat_expr, gnu_array_type, gnat_component_type) - Node_Id gnat_expr; - tree gnu_array_type; - Entity_Id gnat_component_type; +pos_to_constructor (Node_Id gnat_expr, + tree gnu_array_type, + Entity_Id gnat_component_type) { tree gnu_expr; tree gnu_expr_list = NULL_TREE; @@ -5074,9 +5050,7 @@ pos_to_constructor (gnat_expr, gnu_array_type, gnat_component_type) record, make a recursive call to fill it in as well. */ static tree -extract_values (values, record_type) - tree values; - tree record_type; +extract_values (tree values, tree record_type) { tree result = NULL_TREE; tree field, tem; @@ -5123,8 +5097,7 @@ extract_values (values, record_type) an access object and perform the required dereferences. */ static tree -maybe_implicit_deref (exp) - tree exp; +maybe_implicit_deref (tree exp) { /* If the type is a pointer, dereference it. */ @@ -5142,8 +5115,7 @@ maybe_implicit_deref (exp) /* Protect EXP from multiple evaluation. This may make a SAVE_EXPR. */ tree -protect_multiple_eval (exp) - tree exp; +protect_multiple_eval (tree exp) { tree type = TREE_TYPE (exp); @@ -5182,9 +5154,7 @@ protect_multiple_eval (exp) whether to force evaluation of everything. */ tree -gnat_stabilize_reference (ref, force) - tree ref; - int force; +gnat_stabilize_reference (tree ref, int force) { register tree type = TREE_TYPE (ref); register enum tree_code code = TREE_CODE (ref); @@ -5280,9 +5250,7 @@ gnat_stabilize_reference (ref, force) arg to force a SAVE_EXPR for everything. */ static tree -gnat_stabilize_reference_1 (e, force) - tree e; - int force; +gnat_stabilize_reference_1 (tree e, int force) { register enum tree_code code = TREE_CODE (e); register tree type = TREE_TYPE (e); @@ -5345,10 +5313,7 @@ gnat_stabilize_reference_1 (e, force) Return 1 if we didn't need an elaboration function, zero otherwise. */ static int -build_unit_elab (gnat_unit, body_p, gnu_elab_list) - Entity_Id gnat_unit; - int body_p; - tree gnu_elab_list; +build_unit_elab (Entity_Id gnat_unit, int body_p, tree gnu_elab_list) { tree gnu_decl; rtx insn; @@ -5429,16 +5394,14 @@ build_unit_elab (gnat_unit, body_p, gnu_elab_list) return result; } -extern char *__gnat_to_canonical_file_spec PARAMS ((char *)); +extern char *__gnat_to_canonical_file_spec (char *); /* Determine the input_filename and the input_line from the source location (Sloc) of GNAT_NODE node. Set the global variable input_filename and input_line. If WRITE_NOTE_P is true, emit a line number note. */ void -set_lineno (gnat_node, write_note_p) - Node_Id gnat_node; - int write_note_p; +set_lineno (Node_Id gnat_node, int write_note_p) { Source_Ptr source_location = Sloc (gnat_node); @@ -5448,9 +5411,7 @@ set_lineno (gnat_node, write_note_p) /* Likewise, but passed a Sloc. */ void -set_lineno_from_sloc (source_location, write_note_p) - Source_Ptr source_location; - int write_note_p; +set_lineno_from_sloc (Source_Ptr source_location, int write_note_p) { /* If node not from source code, ignore. */ if (source_location < 0) @@ -5486,9 +5447,7 @@ set_lineno_from_sloc (source_location, write_note_p) "&" substitution. */ void -post_error (msg, node) - const char *msg; - Node_Id node; +post_error (const char *msg, Node_Id node) { String_Template temp; Fat_Pointer fp; @@ -5503,10 +5462,7 @@ post_error (msg, node) is the node to use for the "&" substitution. */ void -post_error_ne (msg, node, ent) - const char *msg; - Node_Id node; - Entity_Id ent; +post_error_ne (const char *msg, Node_Id node, Entity_Id ent) { String_Template temp; Fat_Pointer fp; @@ -5521,11 +5477,7 @@ post_error_ne (msg, node, ent) to use for the "&" substitution, and N is the number to use for the ^. */ void -post_error_ne_num (msg, node, ent, n) - const char *msg; - Node_Id node; - Entity_Id ent; - int n; +post_error_ne_num (const char *msg, Node_Id node, Entity_Id ent, int n) { String_Template temp; Fat_Pointer fp; @@ -5545,11 +5497,7 @@ post_error_ne_num (msg, node, ent, n) and the text inside square brackets will be output instead. */ void -post_error_ne_tree (msg, node, ent, t) - const char *msg; - Node_Id node; - Entity_Id ent; - tree t; +post_error_ne_tree (const char *msg, Node_Id node, Entity_Id ent, tree t) { char *newmsg = alloca (strlen (msg) + 1); String_Template temp = {1, 0}; @@ -5597,12 +5545,11 @@ post_error_ne_tree (msg, node, ent, t) integer to write in the message. */ void -post_error_ne_tree_2 (msg, node, ent, t, num) - const char *msg; - Node_Id node; - Entity_Id ent; - tree t; - int num; +post_error_ne_tree_2 (const char *msg, + Node_Id node, + Entity_Id ent, + tree t, + int num) { Error_Msg_Uint_2 = UI_From_Int (num); post_error_ne_tree (msg, node, ent, t); @@ -5611,8 +5558,7 @@ post_error_ne_tree_2 (msg, node, ent, t, num) /* Set the node for a second '&' in the error message. */ void -set_second_error_entity (e) - Entity_Id e; +set_second_error_entity (Entity_Id e) { Error_Msg_Node_2 = e; } @@ -5621,8 +5567,7 @@ set_second_error_entity (e) as the relevant node that provides the location info for the error */ void -gigi_abort (code) - int code; +gigi_abort (int code) { String_Template temp = {1, 10}; Fat_Pointer fp; @@ -5637,7 +5582,7 @@ gigi_abort (code) binary and unary operations. */ void -init_code_table () +init_code_table (void) { gnu_codes[N_And_Then] = TRUTH_ANDIF_EXPR; gnu_codes[N_Or_Else] = TRUTH_ORIF_EXPR; diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index a474870922f..85a159b6d1e 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -144,22 +144,21 @@ struct language_function GTY(()) int unused; }; -static tree merge_sizes PARAMS ((tree, tree, tree, int, int)); -static tree compute_related_constant PARAMS ((tree, tree)); -static tree split_plus PARAMS ((tree, tree *)); -static int value_zerop PARAMS ((tree)); -static tree float_type_for_size PARAMS ((int, enum machine_mode)); -static tree convert_to_fat_pointer PARAMS ((tree, tree)); -static tree convert_to_thin_pointer PARAMS ((tree, tree)); -static tree make_descriptor_field PARAMS ((const char *,tree, tree, - tree)); -static int value_factor_p PARAMS ((tree, int)); -static int potential_alignment_gap PARAMS ((tree, tree, tree)); +static tree merge_sizes (tree, tree, tree, int, int); +static tree compute_related_constant (tree, tree); +static tree split_plus (tree, tree *); +static int value_zerop (tree); +static tree float_type_for_size (int, enum machine_mode); +static tree convert_to_fat_pointer (tree, tree); +static tree convert_to_thin_pointer (tree, tree); +static tree make_descriptor_field (const char *,tree, tree, tree); +static int value_factor_p (tree, int); +static int potential_alignment_gap (tree, tree, tree); /* Initialize the association of GNAT nodes to GCC trees. */ void -init_gnat_to_gnu () +init_gnat_to_gnu (void) { associate_gnat_to_gnu = (tree *) ggc_alloc_cleared (max_gnat_nodes * sizeof (tree)); @@ -174,10 +173,7 @@ init_gnat_to_gnu () If GNU_DECL is zero, a previous association is to be reset. */ void -save_gnu_tree (gnat_entity, gnu_decl, no_check) - Entity_Id gnat_entity; - tree gnu_decl; - int no_check; +save_gnu_tree (Entity_Id gnat_entity, tree gnu_decl, int no_check) { /* Check that GNAT_ENTITY is not already defined and that it is being set to something which is a decl. Raise gigi 401 if not. Usually, this @@ -199,8 +195,7 @@ save_gnu_tree (gnat_entity, gnu_decl, no_check) be elaborated only once, GNAT_ENTITY is really not an entity. */ tree -get_gnu_tree (gnat_entity) - Entity_Id gnat_entity; +get_gnu_tree (Entity_Id gnat_entity) { if (! associate_gnat_to_gnu[gnat_entity - First_Node_Id]) gigi_abort (402); @@ -211,8 +206,7 @@ get_gnu_tree (gnat_entity) /* Return nonzero if a GCC tree has been associated with GNAT_ENTITY. */ int -present_gnu_tree (gnat_entity) - Entity_Id gnat_entity; +present_gnu_tree (Entity_Id gnat_entity) { return (associate_gnat_to_gnu[gnat_entity - First_Node_Id] != NULL_TREE); } @@ -221,7 +215,7 @@ present_gnu_tree (gnat_entity) /* Return non-zero if we are currently in the global binding level. */ int -global_bindings_p () +global_bindings_p (void) { return (force_global != 0 || current_binding_level == global_binding_level ? -1 : 0); @@ -231,7 +225,7 @@ global_bindings_p () is in reverse order (it has to be so for back-end compatibility). */ tree -getdecls () +getdecls (void) { return current_binding_level->names; } @@ -239,7 +233,7 @@ getdecls () /* Nonzero if the current level needs to have a BLOCK made. */ int -kept_level_p () +kept_level_p (void) { return (current_binding_level->names != 0); } @@ -248,8 +242,7 @@ kept_level_p () specified for back-end compatibility. */ void -pushlevel (ignore) - int ignore ATTRIBUTE_UNUSED; +pushlevel (int ignore ATTRIBUTE_UNUSED) { struct binding_level *newlevel = NULL; @@ -287,10 +280,7 @@ pushlevel (ignore) them into the BLOCK. */ tree -poplevel (keep, reverse, functionbody) - int keep; - int reverse; - int functionbody; +poplevel (int keep, int reverse, int functionbody) { /* Points to a GCC BLOCK tree node. This is the BLOCK node construted for the binding level that we are about to exit and which is returned by this @@ -396,8 +386,7 @@ poplevel (keep, reverse, functionbody) to handle the BLOCK node inside the BIND_EXPR. */ void -insert_block (block) - tree block; +insert_block (tree block) { TREE_USED (block) = 1; current_binding_level->blocks @@ -408,8 +397,7 @@ insert_block (block) (the one we are currently in). */ void -set_block (block) - tree block; +set_block (tree block) { current_binding_level->this_block = block; current_binding_level->names = chainon (current_binding_level->names, @@ -422,8 +410,7 @@ set_block (block) Returns the ..._DECL node. */ tree -pushdecl (decl) - tree decl; +pushdecl (tree decl) { struct binding_level *b; @@ -478,7 +465,7 @@ pushdecl (decl) front end has been run. */ void -gnat_init_decl_processing () +gnat_init_decl_processing (void) { input_line = 0; @@ -516,8 +503,7 @@ gnat_init_decl_processing () in the gcc back-end and initialize the global binding level. */ void -init_gigi_decls (long_long_float_type, exception_type) - tree long_long_float_type, exception_type; +init_gigi_decls (tree long_long_float_type, tree exception_type) { tree endlink, decl; unsigned int i; @@ -708,11 +694,10 @@ init_gigi_decls (long_long_float_type, exception_type) on this type; it will be done later. */ void -finish_record_type (record_type, fieldlist, has_rep, defer_debug) - tree record_type; - tree fieldlist; - int has_rep; - int defer_debug; +finish_record_type (tree record_type, + tree fieldlist, + int has_rep, + int defer_debug) { enum tree_code code = TREE_CODE (record_type); tree ada_size = bitsize_zero_node; @@ -1030,11 +1015,11 @@ finish_record_type (record_type, fieldlist, has_rep, defer_debug) We return an expression for the size. */ static tree -merge_sizes (last_size, first_bit, size, special, has_rep) - tree last_size; - tree first_bit, size; - int special; - int has_rep; +merge_sizes (tree last_size, + tree first_bit, + tree size, + int special, + int has_rep) { tree type = TREE_TYPE (last_size); tree new; @@ -1070,8 +1055,7 @@ merge_sizes (last_size, first_bit, size, special, has_rep) related by the addition of a constant. Return that constant if so. */ static tree -compute_related_constant (op0, op1) - tree op0, op1; +compute_related_constant (tree op0, tree op1) { tree op0_var, op1_var; tree op0_con = split_plus (op0, &op0_var); @@ -1092,9 +1076,7 @@ compute_related_constant (op0, op1) bitsizetype. */ static tree -split_plus (in, pvar) - tree in; - tree *pvar; +split_plus (tree in, tree *pvar) { /* Strip NOPS in order to ease the tree traversal and maximize the potential for constant or plus/minus discovery. We need to be careful @@ -1137,12 +1119,12 @@ split_plus (in, pvar) depressed stack pointer. */ tree -create_subprog_type (return_type, param_decl_list, cico_list, - returns_unconstrained, returns_by_ref, returns_with_dsp) - tree return_type; - tree param_decl_list; - tree cico_list; - int returns_unconstrained, returns_by_ref, returns_with_dsp; +create_subprog_type (tree return_type, + tree param_decl_list, + tree cico_list, + int returns_unconstrained, + int returns_by_ref, + int returns_with_dsp) { /* A chain of TREE_LIST nodes whose TREE_VALUEs are the data type nodes of the subprogram formal parameters. This list is generated by traversing the @@ -1186,8 +1168,7 @@ create_subprog_type (return_type, param_decl_list, cico_list, /* Return a copy of TYPE but safe to modify in any way. */ tree -copy_type (type) - tree type; +copy_type (tree type) { tree new = copy_node (type); @@ -1207,9 +1188,7 @@ copy_type (type) TYPE_INDEX_TYPE is INDEX. */ tree -create_index_type (min, max, index) - tree min, max; - tree index; +create_index_type (tree min, tree max, tree index) { /* First build a type for the desired range. */ tree type = build_index_2_type (min, max); @@ -1235,12 +1214,11 @@ create_index_type (min, max, index) information about this type. */ tree -create_type_decl (type_name, type, attr_list, artificial_p, debug_info_p) - tree type_name; - tree type; - struct attrib *attr_list; - int artificial_p; - int debug_info_p; +create_type_decl (tree type_name, + tree type, + struct attrib *attr_list, + int artificial_p, + int debug_info_p) { tree type_decl = build_decl (TYPE_DECL, type_name, type); enum tree_code code = TREE_CODE (type); @@ -1282,17 +1260,15 @@ create_type_decl (type_name, type, attr_list, artificial_p, debug_info_p) it indicates whether to always allocate storage to the variable. */ tree -create_var_decl (var_name, asm_name, type, var_init, const_flag, public_flag, - extern_flag, static_flag, attr_list) - tree var_name; - tree asm_name; - tree type; - tree var_init; - int const_flag; - int public_flag; - int extern_flag; - int static_flag; - struct attrib *attr_list; +create_var_decl (tree var_name, + tree asm_name, + tree type, + tree var_init, + int const_flag, + int public_flag, + int extern_flag, + int static_flag, + struct attrib *attr_list) { int init_const = (var_init == 0 @@ -1397,14 +1373,13 @@ create_var_decl (var_name, asm_name, type, var_init, const_flag, public_flag, the address of this field for aliasing purposes. */ tree -create_field_decl (field_name, field_type, record_type, packed, size, pos, - addressable) - tree field_name; - tree field_type; - tree record_type; - int packed; - tree size, pos; - int addressable; +create_field_decl (tree field_name, + tree field_type, + tree record_type, + int packed, + tree size, + tree pos, + int addressable) { tree field_decl = build_decl (FIELD_DECL, field_name, field_type); @@ -1515,8 +1490,7 @@ create_field_decl (field_name, field_type, record_type, packed, size, pos, effects, has the value of zero. */ static int -value_zerop (exp) - tree exp; +value_zerop (tree exp) { if (TREE_CODE (exp) == COMPOUND_EXPR) return value_zerop (TREE_OPERAND (exp, 1)); @@ -1530,10 +1504,7 @@ value_zerop (exp) parameter). */ tree -create_param_decl (param_name, param_type, readonly) - tree param_name; - tree param_type; - int readonly; +create_param_decl (tree param_name, tree param_type, int readonly) { tree param_decl = build_decl (PARM_DECL, param_name, param_type); @@ -1570,9 +1541,7 @@ create_param_decl (param_name, param_type, readonly) /* Given a DECL and ATTR_LIST, process the listed attributes. */ void -process_attributes (decl, attr_list) - tree decl; - struct attrib *attr_list; +process_attributes (tree decl, struct attrib *attr_list) { for (; attr_list; attr_list = attr_list->next) switch (attr_list->type) @@ -1613,9 +1582,7 @@ process_attributes (decl, attr_list) /* Add some pending elaborations on the list. */ void -add_pending_elaborations (var_decl, var_init) - tree var_decl; - tree var_init; +add_pending_elaborations (tree var_decl, tree var_init) { if (var_init != 0) Check_Elaboration_Code_Allowed (error_gnat_node); @@ -1627,7 +1594,7 @@ add_pending_elaborations (var_decl, var_init) /* Obtain any pending elaborations and clear the old list. */ tree -get_pending_elaborations () +get_pending_elaborations (void) { /* Each thing added to the list went on the end; we want it on the beginning. */ @@ -1641,9 +1608,7 @@ get_pending_elaborations () of 2. */ static int -value_factor_p (value, factor) - tree value; - int factor; +value_factor_p (tree value, int factor) { if (host_integerp (value, 1)) return tree_low_cst (value, 1) % factor == 0; @@ -1662,10 +1627,7 @@ value_factor_p (value, factor) position of CURR_FIELD. It is ignored if null. */ static int -potential_alignment_gap (prev_field, curr_field, offset) - tree prev_field; - tree curr_field; - tree offset; +potential_alignment_gap (tree prev_field, tree curr_field, tree offset) { /* If this is the first field of the record, there cannot be any gap */ if (!prev_field) @@ -1707,7 +1669,7 @@ potential_alignment_gap (prev_field, curr_field, offset) /* Return nonzero if there are pending elaborations. */ int -pending_elaborations_p () +pending_elaborations_p (void) { return TREE_CHAIN (pending_elaborations) != 0; } @@ -1716,7 +1678,7 @@ pending_elaborations_p () one. */ void -push_pending_elaborations () +push_pending_elaborations (void) { struct e_stack *p = (struct e_stack *) ggc_alloc (sizeof (struct e_stack)); @@ -1729,7 +1691,7 @@ push_pending_elaborations () /* Pop the stack of pending elaborations. */ void -pop_pending_elaborations () +pop_pending_elaborations (void) { struct e_stack *p = elist_stack; @@ -1741,7 +1703,7 @@ pop_pending_elaborations () elaborations after that point. */ tree -get_elaboration_location () +get_elaboration_location (void) { return tree_last (pending_elaborations); } @@ -1750,8 +1712,7 @@ get_elaboration_location () list. */ void -insert_elaboration_list (elab) - tree elab; +insert_elaboration_list (tree elab) { tree next = TREE_CHAIN (elab); @@ -1766,8 +1727,7 @@ insert_elaboration_list (elab) /* Returns a LABEL_DECL node for LABEL_NAME. */ tree -create_label_decl (label_name) - tree label_name; +create_label_decl (tree label_name) { tree label_decl = build_decl (LABEL_DECL, label_name, void_type_node); @@ -1787,16 +1747,14 @@ create_label_decl (label_name) appropriate fields in the FUNCTION_DECL. */ tree -create_subprog_decl (subprog_name, asm_name, subprog_type, param_decl_list, - inline_flag, public_flag, extern_flag, attr_list) - tree subprog_name; - tree asm_name; - tree subprog_type; - tree param_decl_list; - int inline_flag; - int public_flag; - int extern_flag; - struct attrib *attr_list; +create_subprog_decl (tree subprog_name, + tree asm_name, + tree subprog_type, + tree param_decl_list, + int inline_flag, + int public_flag, + int extern_flag, + struct attrib *attr_list) { tree return_type = TREE_TYPE (subprog_type); tree subprog_decl = build_decl (FUNCTION_DECL, subprog_name, subprog_type); @@ -1842,8 +1800,7 @@ static int function_nesting_depth; appearing in the subprogram. */ void -begin_subprog_body (subprog_decl) - tree subprog_decl; +begin_subprog_body (tree subprog_decl) { tree param_decl_list; tree param_decl; @@ -1905,7 +1862,7 @@ begin_subprog_body (subprog_decl) to assembler language output. */ void -end_subprog_body () +end_subprog_body (void) { tree decl; tree cico_list; @@ -1979,13 +1936,12 @@ end_subprog_body () ATTRS is nonzero, use that for the function attribute list. */ tree -builtin_function (name, type, function_code, class, library_name, attrs) - const char *name; - tree type; - int function_code; - enum built_in_class class; - const char *library_name; - tree attrs; +builtin_function (const char *name, + tree type, + int function_code, + enum built_in_class class, + const char *library_name, + tree attrs) { tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type); @@ -2007,9 +1963,7 @@ builtin_function (name, type, function_code, class, library_name, attrs) it is a signed type. */ tree -gnat_type_for_size (precision, unsignedp) - unsigned precision; - int unsignedp; +gnat_type_for_size (unsigned precision, int unsignedp) { tree t; char type_name[20]; @@ -2038,9 +1992,7 @@ gnat_type_for_size (precision, unsignedp) /* Likewise for floating-point types. */ static tree -float_type_for_size (precision, mode) - int precision; - enum machine_mode mode; +float_type_for_size (int precision, enum machine_mode mode) { tree t; char type_name[20]; @@ -2068,9 +2020,7 @@ float_type_for_size (precision, mode) an unsigned type; otherwise a signed type is returned. */ tree -gnat_type_for_mode (mode, unsignedp) - enum machine_mode mode; - int unsignedp; +gnat_type_for_mode (enum machine_mode mode, int unsignedp) { if (GET_MODE_CLASS (mode) == MODE_FLOAT) return float_type_for_size (GET_MODE_BITSIZE (mode), mode); @@ -2081,8 +2031,7 @@ gnat_type_for_mode (mode, unsignedp) /* Return the unsigned version of a TYPE_NODE, a scalar type. */ tree -gnat_unsigned_type (type_node) - tree type_node; +gnat_unsigned_type (tree type_node) { tree type = gnat_type_for_size (TYPE_PRECISION (type_node), 1); @@ -2105,8 +2054,7 @@ gnat_unsigned_type (type_node) /* Return the signed version of a TYPE_NODE, a scalar type. */ tree -gnat_signed_type (type_node) - tree type_node; +gnat_signed_type (tree type_node) { tree type = gnat_type_for_size (TYPE_PRECISION (type_node), 0); @@ -2130,9 +2078,7 @@ gnat_signed_type (type_node) UNSIGNEDP. */ tree -gnat_signed_or_unsigned_type (unsignedp, type) - int unsignedp; - tree type; +gnat_signed_or_unsigned_type (int unsignedp, tree type) { if (! INTEGRAL_TYPE_P (type) || TREE_UNSIGNED (type) == unsignedp) return type; @@ -2145,9 +2091,7 @@ gnat_signed_or_unsigned_type (unsignedp, type) minimum (if ! MAX_P) possible value of the discriminant. */ tree -max_size (exp, max_p) - tree exp; - int max_p; +max_size (tree exp, int max_p) { enum tree_code code = TREE_CODE (exp); tree type = TREE_TYPE (exp); @@ -2246,10 +2190,7 @@ max_size (exp, max_p) Return a constructor for the template. */ tree -build_template (template_type, array_type, expr) - tree template_type; - tree array_type; - tree expr; +build_template (tree template_type, tree array_type, tree expr) { tree template_elts = NULL_TREE; tree bound_list = NULL_TREE; @@ -2318,10 +2259,7 @@ build_template (template_type, array_type, expr) an object of that type and also for the name. */ tree -build_vms_descriptor (type, mech, gnat_entity) - tree type; - Mechanism_Type mech; - Entity_Id gnat_entity; +build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity) { tree record_type = make_node (RECORD_TYPE); tree field_list = 0; @@ -2606,11 +2544,7 @@ build_vms_descriptor (type, mech, gnat_entity) /* Utility routine for above code to make a field. */ static tree -make_descriptor_field (name, type, rec_type, initial) - const char *name; - tree type; - tree rec_type; - tree initial; +make_descriptor_field (const char *name, tree type, tree rec_type, tree initial) { tree field = create_field_decl (get_identifier (name), type, rec_type, 0, 0, 0, 0); @@ -2627,10 +2561,7 @@ make_descriptor_field (name, type, rec_type, initial) as the name of the record. */ tree -build_unc_object_type (template_type, object_type, name) - tree template_type; - tree object_type; - tree name; +build_unc_object_type (tree template_type, tree object_type, tree name) { tree type = make_node (RECORD_TYPE); tree template_field = create_field_decl (get_identifier ("BOUNDS"), @@ -2653,9 +2584,7 @@ build_unc_object_type (template_type, object_type, name) if NEW is an UNCONSTRAINED_ARRAY_TYPE. */ void -update_pointer_to (old_type, new_type) - tree old_type; - tree new_type; +update_pointer_to (tree old_type, tree new_type) { tree ptr = TYPE_POINTER_TO (old_type); tree ref = TYPE_REFERENCE_TO (old_type); @@ -2792,9 +2721,7 @@ update_pointer_to (old_type, new_type) pointer. This involves making or finding a template. */ static tree -convert_to_fat_pointer (type, expr) - tree type; - tree expr; +convert_to_fat_pointer (tree type, tree expr) { tree template_type = TREE_TYPE (TREE_TYPE (TREE_CHAIN (TYPE_FIELDS (type)))); tree template, template_addr; @@ -2861,9 +2788,7 @@ convert_to_fat_pointer (type, expr) is not already a fat pointer. */ static tree -convert_to_thin_pointer (type, expr) - tree type; - tree expr; +convert_to_thin_pointer (tree type, tree expr) { if (! TYPE_FAT_POINTER_P (TREE_TYPE (expr))) expr @@ -2886,8 +2811,7 @@ convert_to_thin_pointer (type, expr) not permitted by the language being compiled. */ tree -convert (type, expr) - tree type, expr; +convert (tree type, tree expr) { enum tree_code code = TREE_CODE (type); tree etype = TREE_TYPE (expr); @@ -3229,9 +3153,7 @@ convert (type, expr) the address is not bit-aligned. */ tree -remove_conversions (exp, true_address) - tree exp; - int true_address; +remove_conversions (tree exp, int true_address) { switch (TREE_CODE (exp)) { @@ -3264,8 +3186,7 @@ remove_conversions (exp, true_address) likewise return an expression pointing to the underlying array. */ tree -maybe_unconstrained_array (exp) - tree exp; +maybe_unconstrained_array (tree exp) { enum tree_code code = TREE_CODE (exp); tree new; @@ -3327,10 +3248,7 @@ maybe_unconstrained_array (exp) If NOTRUNC_P is set, truncation operations should be suppressed. */ tree -unchecked_convert (type, expr, notrunc_p) - tree type; - tree expr; - int notrunc_p; +unchecked_convert (tree type, tree expr, int notrunc_p) { tree etype = TREE_TYPE (expr); diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c index 3e90487d711..736e8b7a526 100644 --- a/gcc/ada/utils2.c +++ b/gcc/ada/utils2.c @@ -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)) diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 3924fa76c18..0cc3fe3128e 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -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; diff --git a/gcc/web.c b/gcc/web.c index a8f9f04dd4c..955d4733e3e 100644 --- a/gcc/web.c +++ b/gcc/web.c @@ -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; |