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.
/* Header file for collect/tlink routines.
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);
......@@ -194,9 +191,9 @@ convert_to_real (type, expr)
if (fn)
{
tree arg0 = strip_float_extensions (TREE_VALUE (TREE_OPERAND (expr,
1)));
1)));
tree arglist = build_tree_list (NULL_TREE,
fold (convert_to_real (type, arg0)));
fold (convert_to_real (type, arg0)));
return build_function_call_expr (fn, arglist);
}
......@@ -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);
......@@ -483,7 +479,7 @@ convert_to_integer (type, expr)
/* Don't do unsigned arithmetic where signed was wanted,
or vice versa.
Exception: if both of the original operands were
unsigned then we can safely do the work as unsigned.
unsigned then we can safely do the work as unsigned.
Exception: shift operations take their type solely
from the first argument.
Exception: the LSHIFT_EXPR case above requires that
......@@ -558,7 +554,7 @@ convert_to_integer (type, expr)
/* It is sometimes worthwhile to push the narrowing down through
the conditional and never loses. */
return fold (build (COND_EXPR, type, TREE_OPERAND (expr, 0),
convert (type, TREE_OPERAND (expr, 1)),
convert (type, TREE_OPERAND (expr, 1)),
convert (type, TREE_OPERAND (expr, 2))));
default:
......@@ -593,11 +589,10 @@ 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);
switch (TREE_CODE (TREE_TYPE (expr)))
{
case REAL_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);
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