Commit 159b3be1 by Andreas Jaeger Committed by Andreas Jaeger

collect2.h: Convert prototypes to ISO C90.

	* collect2.h: Convert prototypes to ISO C90.
	* collect2.c: Likewise.
	* conflict.c: Likewise.
	* coverage.c: Likewise.
	* convert.h: Likewise.
	* convert.c: Likewise.

From-SVN: r68669
parent 4e3f84b7
2003-06-29 Andreas Jaeger <aj@suse.de>
* collect2.h: Convert prototypes to ISO C90.
* collect2.c: Likewise.
* conflict.c: Likewise.
* coverage.c: Likewise.
* convert.h: Likewise.
* convert.c: Likewise.
2003-06-29 Nathan Sidwell <nathan@codesourcery.com>
* c-decl.c (c_init_decl_processing): Use a location_t. Set input
......
/* Header file for collect/tlink routines.
Copyright (C) 1998 Free Software Foundation, Inc.
Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -21,17 +21,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifndef GCC_COLLECT2_H
#define GCC_COLLECT2_H
extern void do_tlink PARAMS ((char **, char **));
extern void do_tlink (char **, char **);
extern void collect_execute PARAMS ((const char *, char **, const char *));
extern void collect_execute (const char *, char **, const char *);
extern void collect_exit PARAMS ((int)) ATTRIBUTE_NORETURN;
extern void collect_exit (int) ATTRIBUTE_NORETURN;
extern int collect_wait PARAMS ((const char *));
extern int collect_wait (const char *);
extern void dump_file PARAMS ((const char *));
extern void dump_file (const char *);
extern int file_exists PARAMS ((const char *));
extern int file_exists (const char *);
extern const char *ldout;
extern const char *c_file_name;
......@@ -39,12 +39,11 @@ extern struct obstack temporary_obstack;
extern char *temporary_firstobj;
extern int vflag, debug;
extern void fancy_abort PARAMS ((void)) ATTRIBUTE_NORETURN;
extern void error PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1;
extern void notice PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1;
extern void fatal PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
extern void fatal_perror PARAMS ((const char *, ...))
extern void fancy_abort (void) ATTRIBUTE_NORETURN;
extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
extern void notice (const char *, ...) ATTRIBUTE_PRINTF_1;
extern void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
extern void fatal_perror (const char *, ...)
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
#endif /* ! GCC_COLLECT2_H */
/* Register conflict graph computation routines.
Copyright (C) 2000 Free Software Foundation, Inc.
Copyright (C) 2000, 2003 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC
This file is part of GCC.
......@@ -114,17 +114,16 @@ struct conflict_graph_def
R1 and R2. R1 is assumed to be smaller or equal to R2. */
#define CONFLICT_HASH_FN(R1, R2) ((R2) * ((R2) - 1) / 2 + (R1))
static hashval_t arc_hash PARAMS ((const void *));
static int arc_eq PARAMS ((const void *, const void *));
static int print_conflict PARAMS ((int, int, void *));
static void mark_reg PARAMS ((rtx, rtx, void *));
static hashval_t arc_hash (const void *);
static int arc_eq (const void *, const void *);
static int print_conflict (int, int, void *);
static void mark_reg (rtx, rtx, void *);
/* Callback function to compute the hash value of an arc. Uses
current_graph to locate the graph to which the arc belongs. */
static hashval_t
arc_hash (arcp)
const void *arcp;
arc_hash (const void *arcp)
{
const_conflict_graph_arc arc = (const_conflict_graph_arc) arcp;
......@@ -135,9 +134,7 @@ arc_hash (arcp)
table. */
static int
arc_eq (arcp1, arcp2)
const void *arcp1;
const void *arcp2;
arc_eq (const void *arcp1, const void *arcp2)
{
const_conflict_graph_arc arc1 = (const_conflict_graph_arc) arcp1;
const_conflict_graph_arc arc2 = (const_conflict_graph_arc) arcp2;
......@@ -149,8 +146,7 @@ arc_eq (arcp1, arcp2)
registers. */
conflict_graph
conflict_graph_new (num_regs)
int num_regs;
conflict_graph_new (int num_regs)
{
conflict_graph graph
= (conflict_graph) xmalloc (sizeof (struct conflict_graph_def));
......@@ -175,8 +171,7 @@ conflict_graph_new (num_regs)
/* Deletes a conflict graph. */
void
conflict_graph_delete (graph)
conflict_graph graph;
conflict_graph_delete (conflict_graph graph)
{
obstack_free (&graph->arc_obstack, NULL);
htab_delete (graph->arc_hash_table);
......@@ -189,10 +184,7 @@ conflict_graph_delete (graph)
in GRAPH, in which case it does nothing and returns zero. */
int
conflict_graph_add (graph, reg1, reg2)
conflict_graph graph;
int reg1;
int reg2;
conflict_graph_add (conflict_graph graph, int reg1, int reg2)
{
int smaller = MIN (reg1, reg2);
int larger = MAX (reg1, reg2);
......@@ -238,10 +230,7 @@ conflict_graph_add (graph, reg1, reg2)
and REG2. */
int
conflict_graph_conflict_p (graph, reg1, reg2)
conflict_graph graph;
int reg1;
int reg2;
conflict_graph_conflict_p (conflict_graph graph, int reg1, int reg2)
{
/* Build an arc to search for. */
struct conflict_graph_arc_def arc;
......@@ -255,11 +244,8 @@ conflict_graph_conflict_p (graph, reg1, reg2)
passed back to ENUM_FN. */
void
conflict_graph_enum (graph, reg, enum_fn, extra)
conflict_graph graph;
int reg;
conflict_graph_enum_fn enum_fn;
void *extra;
conflict_graph_enum (conflict_graph graph, int reg,
conflict_graph_enum_fn enum_fn, void *extra)
{
conflict_graph_arc arc = graph->neighbor_heads[reg];
while (arc != NULL)
......@@ -282,10 +268,7 @@ conflict_graph_enum (graph, reg, enum_fn, extra)
conflict to GRAPH between x and TARGET. */
void
conflict_graph_merge_regs (graph, target, src)
conflict_graph graph;
int target;
int src;
conflict_graph_merge_regs (conflict_graph graph, int target, int src)
{
conflict_graph_arc arc = graph->neighbor_heads[src];
......@@ -328,10 +311,7 @@ struct print_context
/* Callback function when enumerating conflicts during printing. */
static int
print_conflict (reg1, reg2, contextp)
int reg1;
int reg2;
void *contextp;
print_conflict (int reg1, int reg2, void *contextp)
{
struct print_context *context = (struct print_context *) contextp;
int reg;
......@@ -363,9 +343,7 @@ print_conflict (reg1, reg2, contextp)
/* Prints the conflicts in GRAPH to FP. */
void
conflict_graph_print (graph, fp)
conflict_graph graph;
FILE *fp;
conflict_graph_print (conflict_graph graph, FILE *fp)
{
int reg;
struct print_context context;
......@@ -394,10 +372,7 @@ conflict_graph_print (graph, fp)
/* Callback function for note_stores. */
static void
mark_reg (reg, setter, data)
rtx reg;
rtx setter ATTRIBUTE_UNUSED;
void *data;
mark_reg (rtx reg, rtx setter ATTRIBUTE_UNUSED, void *data)
{
regset set = (regset) data;
......@@ -441,9 +416,7 @@ mark_reg (reg, setter, data)
canonical regs instead. */
conflict_graph
conflict_graph_compute (regs, p)
regset regs;
partition p;
conflict_graph_compute (regset regs, partition p)
{
conflict_graph graph = conflict_graph_new (max_reg_num ());
regset_head live_head;
......
......@@ -39,8 +39,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
in other cases error is called. */
tree
convert_to_pointer (type, expr)
tree type, expr;
convert_to_pointer (tree type, tree expr)
{
if (integer_zerop (expr))
{
......@@ -75,8 +74,7 @@ convert_to_pointer (type, expr)
/* Avoid any floating point extensions from EXP. */
tree
strip_float_extensions (exp)
tree exp;
strip_float_extensions (tree exp)
{
tree sub, expt, subt;
......@@ -124,8 +122,7 @@ strip_float_extensions (exp)
in other cases error is called. */
tree
convert_to_real (type, expr)
tree type, expr;
convert_to_real (tree type, tree expr)
{
enum built_in_function fcode = builtin_mathfn_code (expr);
tree itype = TREE_TYPE (expr);
......@@ -285,8 +282,7 @@ convert_to_real (type, expr)
not in use in any existing structure. */
tree
convert_to_integer (type, expr)
tree type, expr;
convert_to_integer (tree type, tree expr)
{
enum tree_code ex_form = TREE_CODE (expr);
tree intype = TREE_TYPE (expr);
......@@ -593,8 +589,7 @@ convert_to_integer (type, expr)
/* Convert EXPR to the complex type TYPE in the usual ways. */
tree
convert_to_complex (type, expr)
tree type, expr;
convert_to_complex (tree type, tree expr)
{
tree subtype = TREE_TYPE (type);
......@@ -649,8 +644,7 @@ convert_to_complex (type, expr)
/* Convert EXPR to the vector type TYPE in the usual ways. */
tree
convert_to_vector (type, expr)
tree type, expr;
convert_to_vector (tree type, tree expr)
{
switch (TREE_CODE (TREE_TYPE (expr)))
{
......
/* Definition of functions in convert.c.
Copyright (C) 1993, 2000 Free Software Foundation, Inc.
Copyright (C) 1993, 2000, 2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -18,8 +18,8 @@ along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
extern tree convert_to_integer PARAMS ((tree, tree));
extern tree convert_to_pointer PARAMS ((tree, tree));
extern tree convert_to_real PARAMS ((tree, tree));
extern tree convert_to_complex PARAMS ((tree, tree));
extern tree convert_to_vector PARAMS ((tree, tree));
extern tree convert_to_integer (tree, tree);
extern tree convert_to_pointer (tree, tree);
extern tree convert_to_real (tree, tree);
extern tree convert_to_complex (tree, tree);
extern tree convert_to_vector (tree, tree);
......@@ -104,23 +104,22 @@ static const char *const ctr_merge_functions[GCOV_COUNTERS] = GCOV_MERGE_FUNCTIO
static const char *const ctr_names[GCOV_COUNTERS] = GCOV_COUNTER_NAMES;
/* Forward declarations. */
static hashval_t htab_counts_entry_hash PARAMS ((const void *));
static int htab_counts_entry_eq PARAMS ((const void *, const void *));
static void htab_counts_entry_del PARAMS ((void *));
static void read_counts_file PARAMS ((void));
static unsigned compute_checksum PARAMS ((void));
static unsigned checksum_string PARAMS ((unsigned, const char *));
static tree build_fn_info_type PARAMS ((unsigned));
static tree build_fn_info_value PARAMS ((const struct function_list *, tree));
static tree build_ctr_info_type PARAMS ((void));
static tree build_ctr_info_value PARAMS ((unsigned, tree));
static tree build_gcov_info PARAMS ((void));
static void create_coverage PARAMS ((void));
static hashval_t htab_counts_entry_hash (const void *);
static int htab_counts_entry_eq (const void *, const void *);
static void htab_counts_entry_del (void *);
static void read_counts_file (void);
static unsigned compute_checksum (void);
static unsigned checksum_string (unsigned, const char *);
static tree build_fn_info_type (unsigned);
static tree build_fn_info_value (const struct function_list *, tree);
static tree build_ctr_info_type (void);
static tree build_ctr_info_value (unsigned, tree);
static tree build_gcov_info (void);
static void create_coverage (void);
static hashval_t
htab_counts_entry_hash (of)
const void *of;
htab_counts_entry_hash (const void *of)
{
const counts_entry_t *entry = of;
......@@ -128,9 +127,7 @@ htab_counts_entry_hash (of)
}
static int
htab_counts_entry_eq (of1, of2)
const void *of1;
const void *of2;
htab_counts_entry_eq (const void *of1, const void *of2)
{
const counts_entry_t *entry1 = of1;
const counts_entry_t *entry2 = of2;
......@@ -139,8 +136,7 @@ htab_counts_entry_eq (of1, of2)
}
static void
htab_counts_entry_del (of)
void *of;
htab_counts_entry_del (void *of)
{
counts_entry_t *entry = of;
......@@ -151,7 +147,7 @@ htab_counts_entry_del (of)
/* Read in the counts file, if available. */
static void
read_counts_file ()
read_counts_file (void)
{
gcov_unsigned_t fn_ident = 0;
gcov_unsigned_t version, checksum = -1;
......@@ -413,7 +409,7 @@ checksum_string (unsigned chksum, const char *string)
/* Compute checksum for the current function. We generate a CRC32. */
static unsigned
compute_checksum ()
compute_checksum (void)
{
unsigned chksum = DECL_SOURCE_LINE (current_function_decl);
......@@ -430,7 +426,7 @@ compute_checksum ()
should be output. */
int
coverage_begin_output ()
coverage_begin_output (void)
{
if (no_coverage)
return 0;
......@@ -472,7 +468,7 @@ coverage_begin_output ()
error has occurred. Save function coverage counts. */
void
coverage_end_function ()
coverage_end_function (void)
{
unsigned i;
......@@ -509,8 +505,7 @@ coverage_end_function ()
/* Creates the gcov_fn_info RECORD_TYPE. */
static tree
build_fn_info_type (counters)
unsigned counters;
build_fn_info_type (unsigned int counters)
{
tree type = (*lang_hooks.types.make_type) (RECORD_TYPE);
tree field, fields;
......@@ -542,9 +537,7 @@ build_fn_info_type (counters)
RECORD_TYPE. */
static tree
build_fn_info_value (function, type)
const struct function_list *function;
tree type;
build_fn_info_value (const struct function_list *function, tree type)
{
tree value = NULL_TREE;
tree fields = TYPE_FIELDS (type);
......@@ -586,7 +579,7 @@ build_fn_info_value (function, type)
/* Creates the gcov_ctr_info RECORD_TYPE. */
static tree
build_ctr_info_type ()
build_ctr_info_type (void)
{
tree type = (*lang_hooks.types.make_type) (RECORD_TYPE);
tree field, fields = NULL_TREE;
......@@ -623,9 +616,7 @@ build_ctr_info_type ()
RECORD_TYPE. */
static tree
build_ctr_info_value (counter, type)
unsigned counter;
tree type;
build_ctr_info_value (unsigned int counter, tree type)
{
tree value = NULL_TREE;
tree fields = TYPE_FIELDS (type);
......@@ -679,7 +670,7 @@ build_ctr_info_value (counter, type)
CONSTRUCTOR. */
static tree
build_gcov_info ()
build_gcov_info (void)
{
unsigned n_ctr_types, ix;
tree type, const_type;
......@@ -810,7 +801,7 @@ build_gcov_info ()
gcov-io.h. Write out the constructor to call __gcov_init. */
static void
create_coverage ()
create_coverage (void)
{
tree gcov_info, gcov_info_value;
char name[20];
......@@ -884,8 +875,7 @@ create_coverage ()
of graph file. */
void
coverage_init (filename)
const char *filename;
coverage_init (const char *filename)
{
int len = strlen (filename);
......@@ -906,7 +896,7 @@ coverage_init (filename)
variables and constructor. */
void
coverage_finish ()
coverage_finish (void)
{
create_coverage ();
if (bbg_file_opened)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment