+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
* real.c (encode_ieee_extended): Initialize whole array.
* reg-stack.c (move_for_stack_reg0: Use always XFmode.
* i386-modes.def: Change definitions of TFmode and XFmode.
- * i386.c (classify_argument): Rename TFmodes to XFmodes; add new TFmode code.
+ * i386.c (classify_argument): Rename TFmodes to XFmodes; add new TFmode
+ code.
(construct_container): Allow constructing of TFmode integer containers.
(ix86_return_in_memory): XFmode is not returned in memory.
(init_ext_80387_constants): Always use XFmode.
+2003-10-30 Kelley Cook <kcook@gcc.gnu.org>
+
+ * adadecode.c, adaint.c, argv.c, aux-io.c, cal.c, cio.c, cstreams.c,
+ ctrl_c.c, cuintp.c, decl.c, errno.c, exit.c, expect.c, final.c,
+ gigi.h, gmem.c, gnatbl.c, init.c, misc.c, mkdir.c, raise.c, socket.c,
+ sysdep.c, sysdep.c, targtyps.c, tb-alvms.c, tb-alvxw.c, tracebak.c,
+ trans.c, utils.c, utils2.c: Convert function prototypes to C90.
+
2003-10-30 Vasiliy Fofanov <fofanov@act-europe.fr>
* 3vtrasym.adb:
#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. */
/* 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);
/* 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;
}
/* 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);
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;
}
char *
-ada_demangle (coded_name)
- const char *coded_name;
+ada_demangle (const char *coded_name)
{
char ada_name[2048];
/* 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;
/* 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;
}
char
-__gnat_get_default_identifier_character_set ()
+__gnat_get_default_identifier_character_set (void)
{
#if defined (__EMX__) || defined (MSDOS)
return 'p';
/* 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;
key. */
char *
-__gnat_get_libraries_from_registry ()
+__gnat_get_libraries_from_registry (void)
{
char *result = (char *) "";
}
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)
{
}
}
void
-__gnat_adjust_os_resource_limits ()
+__gnat_adjust_os_resource_limits (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);
#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;
}
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]));
}
/* 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;
}
#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);
}
what time_t is on the target. */
long
-gnat_time ()
+gnat_time (void)
{
return time (0);
}
#endif
int
-get_char ()
+get_char (void)
{
#ifdef VMS
return decc$getchar();
}
int
-get_int ()
+get_int (void)
{
int x;
}
void
-put_int (x)
- int x;
+put_int (int x)
{
/* Use fprintf rather than printf, since the latter is unbuffered
on vxworks */
}
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);
}
#ifdef __vxworks
char *
-mktemp (template)
- char *template;
+mktemp (char *template)
{
return tmpnam (NULL);
}
#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;
}
void
-__gnat_uninstall_int_handler ()
+__gnat_uninstall_int_handler (void)
{
if (sigint_intercepted != NULL)
SetConsoleCtrlHandler (__gnat_int_handler, FALSE);
}
void
-__gnat_uninstall_int_handler ()
+__gnat_uninstall_int_handler (void)
{
}
#endif
resulting node. */
tree
-UI_To_gnu (Input, type)
- Uint Input;
- tree type;
+UI_To_gnu (Uint Input, tree type)
{
tree gnu_ret;
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);
\f
/* 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;
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;
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))
{
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);
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;
/* Initialize the above table. */
void
-init_dummy_type ()
+init_dummy_type (void)
{
Node_Id gnat_node;
/* 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;
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;
/* 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;
/* 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);
/* 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
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;
/* 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.
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);
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;
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;
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;
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));
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;
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;
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;
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;
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;
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;
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
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. */
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;
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;
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;
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;
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. */
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)};
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);
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);
#include <errno.h>
int
-__get_errno()
+__get_errno(void)
{
return errno;
}
void
-__set_errno(err)
- int err;
+__set_errno(int err)
{
errno = err;
}
int gnat_exit_status = 0;
void
-__gnat_set_exit_status (i)
- int i;
+__gnat_set_exit_status (int i)
{
gnat_exit_status = i;
}
}
int
-__gnat_expect_fork ()
+__gnat_expect_fork (void)
{
return 0;
}
}
int
-__gnat_expect_fork ()
+__gnat_expect_fork (void)
{
return -1;
}
}
int
-__gnat_expect_fork ()
+__gnat_expect_fork (void)
{
return fork ();
}
}
int
-__gnat_expect_fork ()
+__gnat_expect_fork (void)
{
return -1;
}
where finalization is required. */
void
-__gnat_finalize ()
+__gnat_finalize (void)
{
}
*/
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);
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;
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 *[]);
\f
static void
-addarg (str)
- char *str;
+addarg (char *str)
{
int i;
}
static void
-process_args (p_argc, argv)
- int *p_argc;
- char *argv[];
+process_args (int *p_argc, char *argv[])
{
int i, j;
}
}
}
-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;
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;
'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';
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;
#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;
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
#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;
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
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);
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
#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);
}
size_t
-__gnat_machine_state_length ()
+__gnat_machine_state_length (void)
{
return sizeof (struct sigcontext);
}
#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;
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
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;
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
#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;
}
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
#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;
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
__gnat_init_float ();
}
#elif defined (__Lynx__)
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
__gnat_init_float ();
}
/*********************************/
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
__gnat_handler_installed = 1;
}
#elif defined (__EMX__) /* OS/2 dependent initialization */
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
/*********************************/
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
__gnat_handler_installed = 1;
}
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;
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
#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;
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
/* 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 */
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 = "";
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
long prvhnd;
char *c;
}
void
-__gnat_initialize()
+__gnat_initialize(void)
{
}
/* 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 ();
}
/* 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;
}
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
struct sigaction act;
#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. */
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
__gnat_init_float ();
#include <unistd.h>
static void
-__gnat_error_handler (sig)
- int sig;
+__gnat_error_handler (int sig)
{
struct Exception_Data *exception;
const char *msg;
}
void
-__gnat_install_handler()
+__gnat_install_handler(void)
{
struct sigaction act;
}
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
__gnat_install_handler ();
__gnat_init_float ();
#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 ();
}
#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 ();
}
/***************************************/
void
-__gnat_initialize ()
+__gnat_initialize (void)
{
}
/********************************************/
void
-__gnat_install_handler ()
+__gnat_install_handler (void)
{
__gnat_handler_installed = 1;
}
#define HAVE_GNAT_INIT_FLOAT
void
-__gnat_init_float ()
+__gnat_init_float (void)
{
#if defined (__i386__) || defined (i386)
/* All targets without a specific __gnat_init_float will use an empty one */
void
-__gnat_init_float ()
+__gnat_init_float (void)
{
}
#endif
/* 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. */
objects. */
void
-gnat_compute_largest_alignment ()
+gnat_compute_largest_alignment (void)
{
enum machine_mode mode;
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
/* 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);
/* 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);
}
performs any system dependent cleanup required. */
void
-__gnat_unhandled_terminate ()
+__gnat_unhandled_terminate (void)
{
/* Special termination handling for VMS */
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 */
} 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;
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;
/* 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;
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;
#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;
/* ! __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;
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;
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
/* 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;
#undef _Unwind_RaiseException
_Unwind_Reason_Code
-__gnat_Unwind_RaiseException (e)
- _Unwind_Exception *e;
+__gnat_Unwind_RaiseException (_Unwind_Exception *e)
{
return _Unwind_SjLj_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);
}
#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);
}
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 ();
}
#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);
\f
/* Free socket set. */
void
-__gnat_free_socket_set (set)
- fd_set *set;
+__gnat_free_socket_set (fd_set *set)
{
__gnat_free (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;
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);
/* 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);
}
/* 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);
}
/* 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;
/* 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);
}
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);
}
"console". */
char *
-__gnat_ttyname (filedes)
- int filedes;
+__gnat_ttyname (int filedes)
{
if (isatty (filedes))
return "console";
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();
}
-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. */
}
/* 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);
/* 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;
/* 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);
}
/* 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)) \
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;
}
#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;
#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;
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;
/* 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);
}
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;
#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;
}
********************/
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;
#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. */
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));
}
static void
-free_trace_alloc ()
+free_trace_alloc (void)
{
while (trace_alloc_chain != 0)
{
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;
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];
}
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;
}
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;
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;
}
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)
}
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);
}
$zero,($ra),1" on alpha. */
static int
-alpha_about_to_return (pc)
- CORE_ADDR pc;
+alpha_about_to_return (CORE_ADDR pc)
{
int inst;
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;
}
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;
}
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;
}
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);
}
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 =
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;
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 ());
}
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;
"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;
#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
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 --*
#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;
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;
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;
part of the tree. */
void
-gnat_to_code (gnat_node)
- Node_Id gnat_node;
+gnat_to_code (Node_Id gnat_node)
{
tree gnu_root;
code. */
tree
-gnat_to_gnu (gnat_node)
- Node_Id gnat_node;
+gnat_to_gnu (Node_Id gnat_node)
{
tree gnu_root;
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;
/* 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);
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;
/* 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;
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;
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;
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);
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;
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;
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);
cases. */
static int
-addressable_p (gnu_expr)
- tree gnu_expr;
+addressable_p (tree gnu_expr)
{
switch (TREE_CODE (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;
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;
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;
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;
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. */
/* 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);
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);
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);
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;
return result;
}
\f
-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);
/* 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)
"&" 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;
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;
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;
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};
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);
/* 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;
}
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;
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;
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);
\f
/* 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));
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
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);
/* 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);
}
/* 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);
is in reverse order (it has to be so for back-end compatibility). */
tree
-getdecls ()
+getdecls (void)
{
return current_binding_level->names;
}
/* 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);
}
specified for back-end compatibility. */
void
-pushlevel (ignore)
- int ignore ATTRIBUTE_UNUSED;
+pushlevel (int ignore ATTRIBUTE_UNUSED)
{
struct binding_level *newlevel = NULL;
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
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
(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,
Returns the ..._DECL node. */
tree
-pushdecl (decl)
- tree decl;
+pushdecl (tree decl)
{
struct binding_level *b;
front end has been run. */
void
-gnat_init_decl_processing ()
+gnat_init_decl_processing (void)
{
input_line = 0;
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;
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;
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;
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);
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
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
/* 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);
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);
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);
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
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);
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));
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);
/* 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)
/* 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);
/* 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. */
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;
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)
/* Return nonzero if there are pending elaborations. */
int
-pending_elaborations_p ()
+pending_elaborations_p (void)
{
return TREE_CHAIN (pending_elaborations) != 0;
}
one. */
void
-push_pending_elaborations ()
+push_pending_elaborations (void)
{
struct e_stack *p = (struct e_stack *) ggc_alloc (sizeof (struct e_stack));
/* Pop the stack of pending elaborations. */
void
-pop_pending_elaborations ()
+pop_pending_elaborations (void)
{
struct e_stack *p = elist_stack;
elaborations after that point. */
tree
-get_elaboration_location ()
+get_elaboration_location (void)
{
return tree_last (pending_elaborations);
}
list. */
void
-insert_elaboration_list (elab)
- tree elab;
+insert_elaboration_list (tree elab)
{
tree next = TREE_CHAIN (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);
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);
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;
to assembler language output. */
void
-end_subprog_body ()
+end_subprog_body (void)
{
tree decl;
tree cico_list;
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);
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];
/* 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];
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);
/* 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);
/* 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);
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;
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);
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;
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;
/* 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);
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"),
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);
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;
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
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);
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))
{
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;
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);
#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);
\f
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR or other logical
operation.
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);
/* 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))
/* 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
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;
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
of some very general solution. */
static int
-contains_save_expr_p (exp)
- tree exp;
+contains_save_expr_p (tree exp)
{
switch (TREE_CODE (exp))
{
that are known to raise Constraint_Error. */
static tree
-contains_null_expr (exp)
- tree exp;
+contains_null_expr (tree exp)
{
tree tem;
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);
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;
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);
/* 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);
/* 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;
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),
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),
/* 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),
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;
/* 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);
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;
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);
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);
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;
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;
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))
we would have to be very careful here. */
bool
-value_profile_transformations ()
+value_profile_transformations (void)
{
rtx insn, next;
int changed = false;
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;
/* 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);
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);
/* 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;
/* 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);
/* 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;
/* Main entry point. */
void
-web_main ()
+web_main (void)
{
struct df *df;
struct web_entry *def_entry;