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> 2003-06-29 Nathan Sidwell <nathan@codesourcery.com>
* c-decl.c (c_init_decl_processing): Use a location_t. Set input * c-decl.c (c_init_decl_processing): Use a location_t. Set input
......
/* Header file for collect/tlink routines. /* 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. This file is part of GCC.
...@@ -21,17 +21,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -21,17 +21,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifndef GCC_COLLECT2_H #ifndef GCC_COLLECT2_H
#define 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 *ldout;
extern const char *c_file_name; extern const char *c_file_name;
...@@ -39,12 +39,11 @@ extern struct obstack temporary_obstack; ...@@ -39,12 +39,11 @@ extern struct obstack temporary_obstack;
extern char *temporary_firstobj; extern char *temporary_firstobj;
extern int vflag, debug; extern int vflag, debug;
extern void fancy_abort PARAMS ((void)) ATTRIBUTE_NORETURN; extern void fancy_abort (void) ATTRIBUTE_NORETURN;
extern void error PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1; extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
extern void notice PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1; extern void notice (const char *, ...) ATTRIBUTE_PRINTF_1;
extern void fatal PARAMS ((const char *, ...)) extern void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; extern void fatal_perror (const char *, ...)
extern void fatal_perror PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
#endif /* ! GCC_COLLECT2_H */ #endif /* ! GCC_COLLECT2_H */
/* Register conflict graph computation routines. /* Register conflict graph computation routines.
Copyright (C) 2000 Free Software Foundation, Inc. Copyright (C) 2000, 2003 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC Contributed by CodeSourcery, LLC
This file is part of GCC. This file is part of GCC.
...@@ -114,17 +114,16 @@ struct conflict_graph_def ...@@ -114,17 +114,16 @@ struct conflict_graph_def
R1 and R2. R1 is assumed to be smaller or equal to R2. */ R1 and R2. R1 is assumed to be smaller or equal to R2. */
#define CONFLICT_HASH_FN(R1, R2) ((R2) * ((R2) - 1) / 2 + (R1)) #define CONFLICT_HASH_FN(R1, R2) ((R2) * ((R2) - 1) / 2 + (R1))
static hashval_t arc_hash PARAMS ((const void *)); static hashval_t arc_hash (const void *);
static int arc_eq PARAMS ((const void *, const void *)); static int arc_eq (const void *, const void *);
static int print_conflict PARAMS ((int, int, void *)); static int print_conflict (int, int, void *);
static void mark_reg PARAMS ((rtx, rtx, void *)); static void mark_reg (rtx, rtx, void *);
/* Callback function to compute the hash value of an arc. Uses /* Callback function to compute the hash value of an arc. Uses
current_graph to locate the graph to which the arc belongs. */ current_graph to locate the graph to which the arc belongs. */
static hashval_t static hashval_t
arc_hash (arcp) arc_hash (const void *arcp)
const void *arcp;
{ {
const_conflict_graph_arc arc = (const_conflict_graph_arc) arcp; const_conflict_graph_arc arc = (const_conflict_graph_arc) arcp;
...@@ -135,9 +134,7 @@ arc_hash (arcp) ...@@ -135,9 +134,7 @@ arc_hash (arcp)
table. */ table. */
static int static int
arc_eq (arcp1, arcp2) arc_eq (const void *arcp1, const void *arcp2)
const void *arcp1;
const void *arcp2;
{ {
const_conflict_graph_arc arc1 = (const_conflict_graph_arc) arcp1; const_conflict_graph_arc arc1 = (const_conflict_graph_arc) arcp1;
const_conflict_graph_arc arc2 = (const_conflict_graph_arc) arcp2; const_conflict_graph_arc arc2 = (const_conflict_graph_arc) arcp2;
...@@ -149,8 +146,7 @@ arc_eq (arcp1, arcp2) ...@@ -149,8 +146,7 @@ arc_eq (arcp1, arcp2)
registers. */ registers. */
conflict_graph conflict_graph
conflict_graph_new (num_regs) conflict_graph_new (int num_regs)
int num_regs;
{ {
conflict_graph graph conflict_graph graph
= (conflict_graph) xmalloc (sizeof (struct conflict_graph_def)); = (conflict_graph) xmalloc (sizeof (struct conflict_graph_def));
...@@ -175,8 +171,7 @@ conflict_graph_new (num_regs) ...@@ -175,8 +171,7 @@ conflict_graph_new (num_regs)
/* Deletes a conflict graph. */ /* Deletes a conflict graph. */
void void
conflict_graph_delete (graph) conflict_graph_delete (conflict_graph graph)
conflict_graph graph;
{ {
obstack_free (&graph->arc_obstack, NULL); obstack_free (&graph->arc_obstack, NULL);
htab_delete (graph->arc_hash_table); htab_delete (graph->arc_hash_table);
...@@ -189,10 +184,7 @@ conflict_graph_delete (graph) ...@@ -189,10 +184,7 @@ conflict_graph_delete (graph)
in GRAPH, in which case it does nothing and returns zero. */ in GRAPH, in which case it does nothing and returns zero. */
int int
conflict_graph_add (graph, reg1, reg2) conflict_graph_add (conflict_graph graph, int reg1, int reg2)
conflict_graph graph;
int reg1;
int reg2;
{ {
int smaller = MIN (reg1, reg2); int smaller = MIN (reg1, reg2);
int larger = MAX (reg1, reg2); int larger = MAX (reg1, reg2);
...@@ -238,10 +230,7 @@ conflict_graph_add (graph, reg1, reg2) ...@@ -238,10 +230,7 @@ conflict_graph_add (graph, reg1, reg2)
and REG2. */ and REG2. */
int int
conflict_graph_conflict_p (graph, reg1, reg2) conflict_graph_conflict_p (conflict_graph graph, int reg1, int reg2)
conflict_graph graph;
int reg1;
int reg2;
{ {
/* Build an arc to search for. */ /* Build an arc to search for. */
struct conflict_graph_arc_def arc; struct conflict_graph_arc_def arc;
...@@ -255,11 +244,8 @@ conflict_graph_conflict_p (graph, reg1, reg2) ...@@ -255,11 +244,8 @@ conflict_graph_conflict_p (graph, reg1, reg2)
passed back to ENUM_FN. */ passed back to ENUM_FN. */
void void
conflict_graph_enum (graph, reg, enum_fn, extra) conflict_graph_enum (conflict_graph graph, int reg,
conflict_graph graph; conflict_graph_enum_fn enum_fn, void *extra)
int reg;
conflict_graph_enum_fn enum_fn;
void *extra;
{ {
conflict_graph_arc arc = graph->neighbor_heads[reg]; conflict_graph_arc arc = graph->neighbor_heads[reg];
while (arc != NULL) while (arc != NULL)
...@@ -282,10 +268,7 @@ conflict_graph_enum (graph, reg, enum_fn, extra) ...@@ -282,10 +268,7 @@ conflict_graph_enum (graph, reg, enum_fn, extra)
conflict to GRAPH between x and TARGET. */ conflict to GRAPH between x and TARGET. */
void void
conflict_graph_merge_regs (graph, target, src) conflict_graph_merge_regs (conflict_graph graph, int target, int src)
conflict_graph graph;
int target;
int src;
{ {
conflict_graph_arc arc = graph->neighbor_heads[src]; conflict_graph_arc arc = graph->neighbor_heads[src];
...@@ -328,10 +311,7 @@ struct print_context ...@@ -328,10 +311,7 @@ struct print_context
/* Callback function when enumerating conflicts during printing. */ /* Callback function when enumerating conflicts during printing. */
static int static int
print_conflict (reg1, reg2, contextp) print_conflict (int reg1, int reg2, void *contextp)
int reg1;
int reg2;
void *contextp;
{ {
struct print_context *context = (struct print_context *) contextp; struct print_context *context = (struct print_context *) contextp;
int reg; int reg;
...@@ -363,9 +343,7 @@ print_conflict (reg1, reg2, contextp) ...@@ -363,9 +343,7 @@ print_conflict (reg1, reg2, contextp)
/* Prints the conflicts in GRAPH to FP. */ /* Prints the conflicts in GRAPH to FP. */
void void
conflict_graph_print (graph, fp) conflict_graph_print (conflict_graph graph, FILE *fp)
conflict_graph graph;
FILE *fp;
{ {
int reg; int reg;
struct print_context context; struct print_context context;
...@@ -394,10 +372,7 @@ conflict_graph_print (graph, fp) ...@@ -394,10 +372,7 @@ conflict_graph_print (graph, fp)
/* Callback function for note_stores. */ /* Callback function for note_stores. */
static void static void
mark_reg (reg, setter, data) mark_reg (rtx reg, rtx setter ATTRIBUTE_UNUSED, void *data)
rtx reg;
rtx setter ATTRIBUTE_UNUSED;
void *data;
{ {
regset set = (regset) data; regset set = (regset) data;
...@@ -441,9 +416,7 @@ mark_reg (reg, setter, data) ...@@ -441,9 +416,7 @@ mark_reg (reg, setter, data)
canonical regs instead. */ canonical regs instead. */
conflict_graph conflict_graph
conflict_graph_compute (regs, p) conflict_graph_compute (regset regs, partition p)
regset regs;
partition p;
{ {
conflict_graph graph = conflict_graph_new (max_reg_num ()); conflict_graph graph = conflict_graph_new (max_reg_num ());
regset_head live_head; regset_head live_head;
......
...@@ -39,8 +39,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -39,8 +39,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
in other cases error is called. */ in other cases error is called. */
tree tree
convert_to_pointer (type, expr) convert_to_pointer (tree type, tree expr)
tree type, expr;
{ {
if (integer_zerop (expr)) if (integer_zerop (expr))
{ {
...@@ -75,8 +74,7 @@ convert_to_pointer (type, expr) ...@@ -75,8 +74,7 @@ convert_to_pointer (type, expr)
/* Avoid any floating point extensions from EXP. */ /* Avoid any floating point extensions from EXP. */
tree tree
strip_float_extensions (exp) strip_float_extensions (tree exp)
tree exp;
{ {
tree sub, expt, subt; tree sub, expt, subt;
...@@ -124,8 +122,7 @@ strip_float_extensions (exp) ...@@ -124,8 +122,7 @@ strip_float_extensions (exp)
in other cases error is called. */ in other cases error is called. */
tree tree
convert_to_real (type, expr) convert_to_real (tree type, tree expr)
tree type, expr;
{ {
enum built_in_function fcode = builtin_mathfn_code (expr); enum built_in_function fcode = builtin_mathfn_code (expr);
tree itype = TREE_TYPE (expr); tree itype = TREE_TYPE (expr);
...@@ -194,9 +191,9 @@ convert_to_real (type, expr) ...@@ -194,9 +191,9 @@ convert_to_real (type, expr)
if (fn) if (fn)
{ {
tree arg0 = strip_float_extensions (TREE_VALUE (TREE_OPERAND (expr, tree arg0 = strip_float_extensions (TREE_VALUE (TREE_OPERAND (expr,
1))); 1)));
tree arglist = build_tree_list (NULL_TREE, 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); return build_function_call_expr (fn, arglist);
} }
...@@ -285,8 +282,7 @@ convert_to_real (type, expr) ...@@ -285,8 +282,7 @@ convert_to_real (type, expr)
not in use in any existing structure. */ not in use in any existing structure. */
tree tree
convert_to_integer (type, expr) convert_to_integer (tree type, tree expr)
tree type, expr;
{ {
enum tree_code ex_form = TREE_CODE (expr); enum tree_code ex_form = TREE_CODE (expr);
tree intype = TREE_TYPE (expr); tree intype = TREE_TYPE (expr);
...@@ -483,7 +479,7 @@ convert_to_integer (type, expr) ...@@ -483,7 +479,7 @@ convert_to_integer (type, expr)
/* Don't do unsigned arithmetic where signed was wanted, /* Don't do unsigned arithmetic where signed was wanted,
or vice versa. or vice versa.
Exception: if both of the original operands were 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 Exception: shift operations take their type solely
from the first argument. from the first argument.
Exception: the LSHIFT_EXPR case above requires that Exception: the LSHIFT_EXPR case above requires that
...@@ -558,7 +554,7 @@ convert_to_integer (type, expr) ...@@ -558,7 +554,7 @@ convert_to_integer (type, expr)
/* It is sometimes worthwhile to push the narrowing down through /* It is sometimes worthwhile to push the narrowing down through
the conditional and never loses. */ the conditional and never loses. */
return fold (build (COND_EXPR, type, TREE_OPERAND (expr, 0), 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)))); convert (type, TREE_OPERAND (expr, 2))));
default: default:
...@@ -593,11 +589,10 @@ convert_to_integer (type, expr) ...@@ -593,11 +589,10 @@ convert_to_integer (type, expr)
/* Convert EXPR to the complex type TYPE in the usual ways. */ /* Convert EXPR to the complex type TYPE in the usual ways. */
tree tree
convert_to_complex (type, expr) convert_to_complex (tree type, tree expr)
tree type, expr;
{ {
tree subtype = TREE_TYPE (type); tree subtype = TREE_TYPE (type);
switch (TREE_CODE (TREE_TYPE (expr))) switch (TREE_CODE (TREE_TYPE (expr)))
{ {
case REAL_TYPE: case REAL_TYPE:
...@@ -649,8 +644,7 @@ convert_to_complex (type, expr) ...@@ -649,8 +644,7 @@ convert_to_complex (type, expr)
/* Convert EXPR to the vector type TYPE in the usual ways. */ /* Convert EXPR to the vector type TYPE in the usual ways. */
tree tree
convert_to_vector (type, expr) convert_to_vector (tree type, tree expr)
tree type, expr;
{ {
switch (TREE_CODE (TREE_TYPE (expr))) switch (TREE_CODE (TREE_TYPE (expr)))
{ {
......
/* Definition of functions in convert.c. /* 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. This file is part of GCC.
...@@ -18,8 +18,8 @@ along with GCC; see the file COPYING. If not, write to the Free ...@@ -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 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */ 02111-1307, USA. */
extern tree convert_to_integer PARAMS ((tree, tree)); extern tree convert_to_integer (tree, tree);
extern tree convert_to_pointer PARAMS ((tree, tree)); extern tree convert_to_pointer (tree, tree);
extern tree convert_to_real PARAMS ((tree, tree)); extern tree convert_to_real (tree, tree);
extern tree convert_to_complex PARAMS ((tree, tree)); extern tree convert_to_complex (tree, tree);
extern tree convert_to_vector PARAMS ((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