Commit 439f7bc3 by Andreas Jaeger

fp-test.c (main): Use ISO C90 prototype.

	* fp-test.c (main): Use ISO C90 prototype.

	* version.c: Remove unneded include of ansidecl.h.

	* cgraph.h: Convert prototypes to ISO C90.
	* cgraph.c: Likewise.
	* fix-header.c: Likewise.
	* ra.h: Likewise.
	* protoize.c: Likewise.

From-SVN: r69265
parent 1a5c5701
2003-07-12 Andreas Jaeger <aj@suse.de>
* fp-test.c (main): Use ISO C90 prototype.
* version.c: Remove unneded include of ansidecl.h.
* cgraph.h: Convert prototypes to ISO C90.
* cgraph.c: Likewise.
* fix-header.c: Likewise.
* ra.h: Likewise.
* protoize.c: Likewise.
Sat Jul 12 06:09:38 CEST 2003 Jan Hubicka <jh@suse.cz> Sat Jul 12 06:09:38 CEST 2003 Jan Hubicka <jh@suse.cz>
* cgraphunit.c (cgraph_inlined_into, cgraph_inlined_calees): Fix * cgraphunit.c (cgraph_inlined_into, cgraph_inlined_calees): Fix
...@@ -32,7 +44,7 @@ Sat Jul 12 03:06:01 CEST 2003 Jan Hubicka <jh@suse.cz> ...@@ -32,7 +44,7 @@ Sat Jul 12 03:06:01 CEST 2003 Jan Hubicka <jh@suse.cz>
(cgraph_inlined_into, cgraph_inlined_callees, (cgraph_inlined_into, cgraph_inlined_callees,
cgraph_estimate_size_after_inlining, cgraph_estimate_growth, cgraph_estimate_size_after_inlining, cgraph_estimate_growth,
cgraph_mark_inline, cgraph_check_inline_limits, cgraph_mark_inline, cgraph_check_inline_limits,
cgraph_default_inline_p, cgraph_decide_inling_of_small_functions, cgraph_default_inline_p, cgraph_decide_inling_of_small_functions,
cgraph_decide_inlining, cgraph_inline_p): New functions. cgraph_decide_inlining, cgraph_inline_p): New functions.
* params.def (PARAM_LARGE_FUNCTION_INSNS, PARAM_LARGE_FUNCTION_GROWTH, * params.def (PARAM_LARGE_FUNCTION_INSNS, PARAM_LARGE_FUNCTION_GROWTH,
PARAM_INLINE_UNIT_GROWTH): New parameters. PARAM_INLINE_UNIT_GROWTH): New parameters.
...@@ -111,7 +123,7 @@ Sat Jul 12 03:06:01 CEST 2003 Jan Hubicka <jh@suse.cz> ...@@ -111,7 +123,7 @@ Sat Jul 12 03:06:01 CEST 2003 Jan Hubicka <jh@suse.cz>
* c-decl.c (finish_decl): Handle 'used' here... * c-decl.c (finish_decl): Handle 'used' here...
* cgraphunit.c (cgraph_finalize_function): ... and here ... * cgraphunit.c (cgraph_finalize_function): ... and here ...
* c-common.c: (handle_used_attribute): ... not here. * c-common.c: (handle_used_attribute): ... not here.
* configure.in (onstep): Support --enable-intermodule. * configure.in (onstep): Support --enable-intermodule.
* Makefile.in (OBJS-common): New. * Makefile.in (OBJS-common): New.
(OBJS-md): New. (OBJS-md): New.
...@@ -121,7 +133,7 @@ Sat Jul 12 03:06:01 CEST 2003 Jan Hubicka <jh@suse.cz> ...@@ -121,7 +133,7 @@ Sat Jul 12 03:06:01 CEST 2003 Jan Hubicka <jh@suse.cz>
(libbackend.a): Support @onestep@. (libbackend.a): Support @onestep@.
(libbackend.o): New. (libbackend.o): New.
* configure: Regenerate. * configure: Regenerate.
* c-common.h (c_reset_state): New prototype. * c-common.h (c_reset_state): New prototype.
(c_parse_file): New prototype. (c_parse_file): New prototype.
(finish_file): Move prototype from c-tree.h. (finish_file): Move prototype from c-tree.h.
...@@ -203,7 +215,7 @@ Sat Jul 12 03:06:01 CEST 2003 Jan Hubicka <jh@suse.cz> ...@@ -203,7 +215,7 @@ Sat Jul 12 03:06:01 CEST 2003 Jan Hubicka <jh@suse.cz>
* loop.c (loop_iv_add_mult_emit_before): Call loop_regs_update before * loop.c (loop_iv_add_mult_emit_before): Call loop_regs_update before
loop_insn_emit_before. loop_insn_emit_before.
(loop_iv_add_mult_sink, loop_iv_add_mult_hoist): Likewise. (loop_iv_add_mult_sink, loop_iv_add_mult_hoist): Likewise.
2003-07-10 Zack Weinberg <zack@codesourcery.com> 2003-07-10 Zack Weinberg <zack@codesourcery.com>
* cppcharset.c: Fix comment. * cppcharset.c: Fix comment.
......
...@@ -66,17 +66,16 @@ int cgraph_varpool_n_nodes; ...@@ -66,17 +66,16 @@ int cgraph_varpool_n_nodes;
/* The linked list of cgraph varpool nodes. */ /* The linked list of cgraph varpool nodes. */
static GTY(()) struct cgraph_varpool_node *cgraph_varpool_nodes; static GTY(()) struct cgraph_varpool_node *cgraph_varpool_nodes;
static struct cgraph_edge *create_edge PARAMS ((struct cgraph_node *, static struct cgraph_edge *create_edge (struct cgraph_node *,
struct cgraph_node *)); struct cgraph_node *);
static void cgraph_remove_edge PARAMS ((struct cgraph_node *, struct cgraph_node *)); static void cgraph_remove_edge (struct cgraph_node *, struct cgraph_node *);
static hashval_t hash_node PARAMS ((const void *)); static hashval_t hash_node (const void *);
static int eq_node PARAMS ((const void *, const void *)); static int eq_node (const void *, const void *);
/* Returns a hash code for P. */ /* Returns a hash code for P. */
static hashval_t static hashval_t
hash_node (p) hash_node (const void *p)
const void *p;
{ {
return ((hashval_t) return ((hashval_t)
IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME
...@@ -86,9 +85,7 @@ hash_node (p) ...@@ -86,9 +85,7 @@ hash_node (p)
/* Returns nonzero if P1 and P2 are equal. */ /* Returns nonzero if P1 and P2 are equal. */
static int static int
eq_node (p1, p2) eq_node (const void *p1, const void *p2)
const void *p1;
const void *p2;
{ {
return ((DECL_ASSEMBLER_NAME (((struct cgraph_node *) p1)->decl)) == return ((DECL_ASSEMBLER_NAME (((struct cgraph_node *) p1)->decl)) ==
(tree) p2); (tree) p2);
...@@ -96,8 +93,7 @@ eq_node (p1, p2) ...@@ -96,8 +93,7 @@ eq_node (p1, p2)
/* Return cgraph node assigned to DECL. Create new one when needed. */ /* Return cgraph node assigned to DECL. Create new one when needed. */
struct cgraph_node * struct cgraph_node *
cgraph_node (decl) cgraph_node (tree decl)
tree decl;
{ {
struct cgraph_node *node; struct cgraph_node *node;
struct cgraph_node **slot; struct cgraph_node **slot;
...@@ -135,8 +131,7 @@ cgraph_node (decl) ...@@ -135,8 +131,7 @@ cgraph_node (decl)
/* Try to find existing function for identifier ID. */ /* Try to find existing function for identifier ID. */
struct cgraph_node * struct cgraph_node *
cgraph_node_for_identifier (id) cgraph_node_for_identifier (tree id)
tree id;
{ {
struct cgraph_node **slot; struct cgraph_node **slot;
...@@ -148,7 +143,7 @@ cgraph_node_for_identifier (id) ...@@ -148,7 +143,7 @@ cgraph_node_for_identifier (id)
slot = (struct cgraph_node **) slot = (struct cgraph_node **)
htab_find_slot_with_hash (cgraph_hash, id, htab_find_slot_with_hash (cgraph_hash, id,
IDENTIFIER_HASH_VALUE (id), 0); IDENTIFIER_HASH_VALUE (id), 0);
if (!slot) if (!slot)
return NULL; return NULL;
return *slot; return *slot;
...@@ -157,8 +152,7 @@ cgraph_node_for_identifier (id) ...@@ -157,8 +152,7 @@ cgraph_node_for_identifier (id)
/* Create edge from CALLER to CALLEE in the cgraph. */ /* Create edge from CALLER to CALLEE in the cgraph. */
static struct cgraph_edge * static struct cgraph_edge *
create_edge (caller, callee) create_edge (struct cgraph_node *caller, struct cgraph_node *callee)
struct cgraph_node *caller, *callee;
{ {
struct cgraph_edge *edge = ggc_alloc (sizeof (struct cgraph_edge)); struct cgraph_edge *edge = ggc_alloc (sizeof (struct cgraph_edge));
struct cgraph_edge *edge2; struct cgraph_edge *edge2;
...@@ -187,8 +181,7 @@ create_edge (caller, callee) ...@@ -187,8 +181,7 @@ create_edge (caller, callee)
/* Remove the edge from CALLER to CALLEE in the cgraph. */ /* Remove the edge from CALLER to CALLEE in the cgraph. */
static void static void
cgraph_remove_edge (caller, callee) cgraph_remove_edge (struct cgraph_node *caller, struct cgraph_node *callee)
struct cgraph_node *caller, *callee;
{ {
struct cgraph_edge **edge, **edge2; struct cgraph_edge **edge, **edge2;
...@@ -209,8 +202,7 @@ cgraph_remove_edge (caller, callee) ...@@ -209,8 +202,7 @@ cgraph_remove_edge (caller, callee)
/* Remove the node from cgraph. */ /* Remove the node from cgraph. */
void void
cgraph_remove_node (node) cgraph_remove_node (struct cgraph_node *node)
struct cgraph_node *node;
{ {
while (node->callers) while (node->callers)
cgraph_remove_edge (node->callers->caller, node); cgraph_remove_edge (node->callers->caller, node);
...@@ -239,9 +231,7 @@ cgraph_remove_node (node) ...@@ -239,9 +231,7 @@ cgraph_remove_node (node)
/* Notify finalize_compilation_unit that given node is reachable /* Notify finalize_compilation_unit that given node is reachable
or needed. */ or needed. */
void void
cgraph_mark_needed_node (node, needed) cgraph_mark_needed_node (struct cgraph_node *node, int needed)
struct cgraph_node *node;
int needed;
{ {
if (needed) if (needed)
{ {
...@@ -262,15 +252,13 @@ cgraph_mark_needed_node (node, needed) ...@@ -262,15 +252,13 @@ cgraph_mark_needed_node (node, needed)
/* Record call from CALLER to CALLEE */ /* Record call from CALLER to CALLEE */
struct cgraph_edge * struct cgraph_edge *
cgraph_record_call (caller, callee) cgraph_record_call (tree caller, tree callee)
tree caller, callee;
{ {
return create_edge (cgraph_node (caller), cgraph_node (callee)); return create_edge (cgraph_node (caller), cgraph_node (callee));
} }
void void
cgraph_remove_call (caller, callee) cgraph_remove_call (tree caller, tree callee)
tree caller, callee;
{ {
cgraph_remove_edge (cgraph_node (caller), cgraph_node (callee)); cgraph_remove_edge (cgraph_node (caller), cgraph_node (callee));
} }
...@@ -278,8 +266,7 @@ cgraph_remove_call (caller, callee) ...@@ -278,8 +266,7 @@ cgraph_remove_call (caller, callee)
/* Return true when CALLER_DECL calls CALLEE_DECL. */ /* Return true when CALLER_DECL calls CALLEE_DECL. */
bool bool
cgraph_calls_p (caller_decl, callee_decl) cgraph_calls_p (tree caller_decl, tree callee_decl)
tree caller_decl, callee_decl;
{ {
struct cgraph_node *caller = cgraph_node (caller_decl); struct cgraph_node *caller = cgraph_node (caller_decl);
struct cgraph_node *callee = cgraph_node (callee_decl); struct cgraph_node *callee = cgraph_node (callee_decl);
...@@ -294,8 +281,7 @@ cgraph_calls_p (caller_decl, callee_decl) ...@@ -294,8 +281,7 @@ cgraph_calls_p (caller_decl, callee_decl)
/* Return local info for the compiled function. */ /* Return local info for the compiled function. */
struct cgraph_local_info * struct cgraph_local_info *
cgraph_local_info (decl) cgraph_local_info (tree decl)
tree decl;
{ {
struct cgraph_node *node; struct cgraph_node *node;
if (TREE_CODE (decl) != FUNCTION_DECL) if (TREE_CODE (decl) != FUNCTION_DECL)
...@@ -307,8 +293,7 @@ cgraph_local_info (decl) ...@@ -307,8 +293,7 @@ cgraph_local_info (decl)
/* Return local info for the compiled function. */ /* Return local info for the compiled function. */
struct cgraph_global_info * struct cgraph_global_info *
cgraph_global_info (decl) cgraph_global_info (tree decl)
tree decl;
{ {
struct cgraph_node *node; struct cgraph_node *node;
if (TREE_CODE (decl) != FUNCTION_DECL || !cgraph_global_info_ready) if (TREE_CODE (decl) != FUNCTION_DECL || !cgraph_global_info_ready)
...@@ -320,8 +305,7 @@ cgraph_global_info (decl) ...@@ -320,8 +305,7 @@ cgraph_global_info (decl)
/* Return local info for the compiled function. */ /* Return local info for the compiled function. */
struct cgraph_rtl_info * struct cgraph_rtl_info *
cgraph_rtl_info (decl) cgraph_rtl_info (tree decl)
tree decl;
{ {
struct cgraph_node *node; struct cgraph_node *node;
if (TREE_CODE (decl) != FUNCTION_DECL) if (TREE_CODE (decl) != FUNCTION_DECL)
...@@ -335,8 +319,7 @@ cgraph_rtl_info (decl) ...@@ -335,8 +319,7 @@ cgraph_rtl_info (decl)
/* Return name of the node used in debug output. */ /* Return name of the node used in debug output. */
const char * const char *
cgraph_node_name (node) cgraph_node_name (struct cgraph_node *node)
struct cgraph_node *node;
{ {
return (*lang_hooks.decl_printable_name) (node->decl, 2); return (*lang_hooks.decl_printable_name) (node->decl, 2);
} }
...@@ -344,8 +327,7 @@ cgraph_node_name (node) ...@@ -344,8 +327,7 @@ cgraph_node_name (node)
/* Dump the callgraph. */ /* Dump the callgraph. */
void void
dump_cgraph (f) dump_cgraph (FILE *f)
FILE *f;
{ {
struct cgraph_node *node; struct cgraph_node *node;
...@@ -398,7 +380,7 @@ dump_cgraph (f) ...@@ -398,7 +380,7 @@ dump_cgraph (f)
/* Returns a hash code for P. */ /* Returns a hash code for P. */
static hashval_t static hashval_t
cgraph_varpool_hash_node (const PTR p) cgraph_varpool_hash_node (const void *p)
{ {
return ((hashval_t) return ((hashval_t)
IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME
...@@ -408,7 +390,7 @@ cgraph_varpool_hash_node (const PTR p) ...@@ -408,7 +390,7 @@ cgraph_varpool_hash_node (const PTR p)
/* Returns nonzero if P1 and P2 are equal. */ /* Returns nonzero if P1 and P2 are equal. */
static int static int
eq_cgraph_varpool_node (const PTR p1, const PTR p2) eq_cgraph_varpool_node (const void *p1, const void *p2)
{ {
return ((DECL_ASSEMBLER_NAME (((struct cgraph_varpool_node *) p1)->decl)) == return ((DECL_ASSEMBLER_NAME (((struct cgraph_varpool_node *) p1)->decl)) ==
(tree) p2); (tree) p2);
...@@ -502,7 +484,7 @@ cgraph_varpool_finalize_decl (tree decl) ...@@ -502,7 +484,7 @@ cgraph_varpool_finalize_decl (tree decl)
} }
bool bool
cgraph_varpool_assemble_pending_decls () cgraph_varpool_assemble_pending_decls (void)
{ {
bool changed = false; bool changed = false;
......
...@@ -153,17 +153,17 @@ extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_nodes_queue; ...@@ -153,17 +153,17 @@ extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_nodes_queue;
/* In cgraph.c */ /* In cgraph.c */
void dump_cgraph PARAMS ((FILE *)); void dump_cgraph (FILE *);
void cgraph_remove_call PARAMS ((tree, tree)); void cgraph_remove_call (tree, tree);
void cgraph_remove_node PARAMS ((struct cgraph_node *)); void cgraph_remove_node (struct cgraph_node *);
struct cgraph_edge *cgraph_record_call PARAMS ((tree, tree)); struct cgraph_edge *cgraph_record_call (tree, tree);
struct cgraph_node *cgraph_node PARAMS ((tree decl)); struct cgraph_node *cgraph_node (tree decl);
struct cgraph_node *cgraph_node_for_identifier PARAMS ((tree id)); struct cgraph_node *cgraph_node_for_identifier (tree id);
bool cgraph_calls_p PARAMS ((tree, tree)); bool cgraph_calls_p (tree, tree);
struct cgraph_local_info *cgraph_local_info PARAMS ((tree)); struct cgraph_local_info *cgraph_local_info (tree);
struct cgraph_global_info *cgraph_global_info PARAMS ((tree)); struct cgraph_global_info *cgraph_global_info (tree);
struct cgraph_rtl_info *cgraph_rtl_info PARAMS ((tree)); struct cgraph_rtl_info *cgraph_rtl_info (tree);
const char * cgraph_node_name PARAMS ((struct cgraph_node *)); const char * cgraph_node_name (struct cgraph_node *);
struct cgraph_varpool_node *cgraph_varpool_node (tree decl); struct cgraph_varpool_node *cgraph_varpool_node (tree decl);
struct cgraph_varpool_node *cgraph_varpool_node_for_identifier (tree id); struct cgraph_varpool_node *cgraph_varpool_node_for_identifier (tree id);
...@@ -172,11 +172,11 @@ void cgraph_varpool_finalize_decl (tree); ...@@ -172,11 +172,11 @@ void cgraph_varpool_finalize_decl (tree);
bool cgraph_varpool_assemble_pending_decls (void); bool cgraph_varpool_assemble_pending_decls (void);
/* In cgraphunit.c */ /* In cgraphunit.c */
void cgraph_finalize_function PARAMS ((tree, tree)); void cgraph_finalize_function (tree, tree);
void cgraph_finalize_compilation_unit PARAMS ((void)); void cgraph_finalize_compilation_unit (void);
void cgraph_create_edges PARAMS ((tree, tree)); void cgraph_create_edges (tree, tree);
void cgraph_optimize PARAMS ((void)); void cgraph_optimize (void);
void cgraph_mark_needed_node PARAMS ((struct cgraph_node *, int)); void cgraph_mark_needed_node (struct cgraph_node *, int);
bool cgraph_inline_p PARAMS ((tree, tree)); bool cgraph_inline_p (tree, tree);
#endif /* GCC_CGRAPH_H */ #endif /* GCC_CGRAPH_H */
...@@ -80,8 +80,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ...@@ -80,8 +80,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "cpplib.h" #include "cpplib.h"
#include "c-incpath.h" #include "c-incpath.h"
static void v_fatal PARAMS ((const char *, va_list)) ATTRIBUTE_PRINTF (1,0) ATTRIBUTE_NORETURN; static void v_fatal (const char *, va_list)
static void fatal PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF (1,0) ATTRIBUTE_NORETURN;
static void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
sstring buf; sstring buf;
...@@ -187,23 +188,21 @@ struct symbol_list { ...@@ -187,23 +188,21 @@ struct symbol_list {
struct symbol_list symbol_table[SYMBOL_TABLE_SIZE]; struct symbol_list symbol_table[SYMBOL_TABLE_SIZE];
int cur_symbol_table_size; int cur_symbol_table_size;
static void add_symbols PARAMS ((symbol_flags, namelist)); static void add_symbols (symbol_flags, namelist);
static struct fn_decl *lookup_std_proto PARAMS ((const char *, int)); static struct fn_decl *lookup_std_proto (const char *, int);
static void write_lbrac PARAMS ((void)); static void write_lbrac (void);
static void recognized_macro PARAMS ((const char *)); static void recognized_macro (const char *);
static void check_macro_names PARAMS ((cpp_reader *, namelist)); static void check_macro_names (cpp_reader *, namelist);
static void read_scan_file PARAMS ((char *, int, char **)); static void read_scan_file (char *, int, char **);
static void write_rbrac PARAMS ((void)); static void write_rbrac (void);
static int inf_skip_spaces PARAMS ((int)); static int inf_skip_spaces (int);
static int inf_read_upto PARAMS ((sstring *, int)); static int inf_read_upto (sstring *, int);
static int inf_scan_ident PARAMS ((sstring *, int)); static int inf_scan_ident (sstring *, int);
static int check_protection PARAMS ((int *, int *)); static int check_protection (int *, int *);
static void cb_file_change PARAMS ((cpp_reader *, const struct line_map *)); static void cb_file_change (cpp_reader *, const struct line_map *);
static void static void
add_symbols (flags, names) add_symbols (symbol_flags flags, namelist names)
symbol_flags flags;
namelist names;
{ {
symbol_table[cur_symbol_table_size].flags = flags; symbol_table[cur_symbol_table_size].flags = flags;
symbol_table[cur_symbol_table_size].names = names; symbol_table[cur_symbol_table_size].names = names;
...@@ -376,9 +375,7 @@ struct obstack scan_file_obstack; ...@@ -376,9 +375,7 @@ struct obstack scan_file_obstack;
/* NOTE: If you edit this, also edit gen-protos.c !! */ /* NOTE: If you edit this, also edit gen-protos.c !! */
static struct fn_decl * static struct fn_decl *
lookup_std_proto (name, name_length) lookup_std_proto (const char *name, int name_length)
const char *name;
int name_length;
{ {
int i = hashstr (name, name_length) % HASH_SIZE; int i = hashstr (name, name_length) % HASH_SIZE;
int i0 = i; int i0 = i;
...@@ -409,7 +406,7 @@ int required_unseen_count = 0; ...@@ -409,7 +406,7 @@ int required_unseen_count = 0;
int required_other = 0; int required_other = 0;
static void static void
write_lbrac () write_lbrac (void)
{ {
if (partial_count) if (partial_count)
{ {
...@@ -438,8 +435,7 @@ struct partial_proto required_dummy_proto, seen_dummy_proto; ...@@ -438,8 +435,7 @@ struct partial_proto required_dummy_proto, seen_dummy_proto;
#define SEEN(FN) ((FN)->partial == &seen_dummy_proto) #define SEEN(FN) ((FN)->partial == &seen_dummy_proto)
static void static void
recognized_macro (fname) recognized_macro (const char *fname)
const char *fname;
{ {
/* The original include file defines fname as a macro. */ /* The original include file defines fname as a macro. */
struct fn_decl *fn = lookup_std_proto (fname, strlen (fname)); struct fn_decl *fn = lookup_std_proto (fname, strlen (fname));
...@@ -488,8 +484,7 @@ recognized_macro (fname) ...@@ -488,8 +484,7 @@ recognized_macro (fname)
} }
void void
recognized_extern (name) recognized_extern (const cpp_token *name)
const cpp_token *name;
{ {
switch (special_file_handling) switch (special_file_handling)
{ {
...@@ -509,11 +504,8 @@ recognized_extern (name) ...@@ -509,11 +504,8 @@ recognized_extern (name)
'extern "C"' braces); or 'f' for other function declarations. */ 'extern "C"' braces); or 'f' for other function declarations. */
void void
recognized_function (fname, line, kind, have_arg_list) recognized_function (const cpp_token *fname, unsigned int line, int kind,
const cpp_token *fname; int have_arg_list)
unsigned int line;
int kind; /* One of 'f' 'F' or 'I' */
int have_arg_list;
{ {
struct partial_proto *partial; struct partial_proto *partial;
int i; int i;
...@@ -570,9 +562,7 @@ recognized_function (fname, line, kind, have_arg_list) ...@@ -570,9 +562,7 @@ recognized_function (fname, line, kind, have_arg_list)
call recognized_macro on it. */ call recognized_macro on it. */
static void static void
check_macro_names (pfile, names) check_macro_names (cpp_reader *pfile, namelist names)
cpp_reader *pfile;
namelist names;
{ {
size_t len; size_t len;
while (*names) while (*names)
...@@ -585,19 +575,15 @@ check_macro_names (pfile, names) ...@@ -585,19 +575,15 @@ check_macro_names (pfile, names)
} }
static void static void
cb_file_change (pfile, map) cb_file_change (cpp_reader *pfile ATTRIBUTE_UNUSED,
cpp_reader *pfile ATTRIBUTE_UNUSED; const struct line_map *map)
const struct line_map *map;
{ {
/* Just keep track of current file name. */ /* Just keep track of current file name. */
cur_file = map->to_file; cur_file = map->to_file;
} }
static void static void
read_scan_file (in_fname, argc, argv) read_scan_file (char *in_fname, int argc, char **argv)
char *in_fname;
int argc;
char **argv;
{ {
cpp_reader *scan_in; cpp_reader *scan_in;
cpp_callbacks *cb; cpp_callbacks *cb;
...@@ -741,7 +727,7 @@ read_scan_file (in_fname, argc, argv) ...@@ -741,7 +727,7 @@ read_scan_file (in_fname, argc, argv)
} }
static void static void
write_rbrac () write_rbrac (void)
{ {
struct fn_decl *fn; struct fn_decl *fn;
const char *cptr; const char *cptr;
...@@ -881,8 +867,7 @@ write_rbrac () ...@@ -881,8 +867,7 @@ write_rbrac ()
#define INF_UNGET(c) ((c)!=EOF && inf_ptr--) #define INF_UNGET(c) ((c)!=EOF && inf_ptr--)
static int static int
inf_skip_spaces (c) inf_skip_spaces (int c)
int c;
{ {
for (;;) for (;;)
{ {
...@@ -920,9 +905,7 @@ inf_skip_spaces (c) ...@@ -920,9 +905,7 @@ inf_skip_spaces (c)
/* Read into STR from inf_buffer upto DELIM. */ /* Read into STR from inf_buffer upto DELIM. */
static int static int
inf_read_upto (str, delim) inf_read_upto (sstring *str, int delim)
sstring *str;
int delim;
{ {
int ch; int ch;
for (;;) for (;;)
...@@ -938,9 +921,7 @@ inf_read_upto (str, delim) ...@@ -938,9 +921,7 @@ inf_read_upto (str, delim)
} }
static int static int
inf_scan_ident (s, c) inf_scan_ident (sstring *s, int c)
sstring *s;
int c;
{ {
s->ptr = s->base; s->ptr = s->base;
if (ISIDST (c)) if (ISIDST (c))
...@@ -964,8 +945,7 @@ inf_scan_ident (s, c) ...@@ -964,8 +945,7 @@ inf_scan_ident (s, c)
Otherwise return 0. */ Otherwise return 0. */
static int static int
check_protection (ifndef_line, endif_line) check_protection (int *ifndef_line, int *endif_line)
int *ifndef_line, *endif_line;
{ {
int c; int c;
int if_nesting = 1; /* Level of nesting of #if's */ int if_nesting = 1; /* Level of nesting of #if's */
...@@ -1066,12 +1046,10 @@ check_protection (ifndef_line, endif_line) ...@@ -1066,12 +1046,10 @@ check_protection (ifndef_line, endif_line)
return 1; return 1;
} }
extern int main PARAMS ((int, char **)); extern int main (int, char **);
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
int inf_fd; int inf_fd;
struct stat sbuf; struct stat sbuf;
...@@ -1314,9 +1292,7 @@ main (argc, argv) ...@@ -1314,9 +1292,7 @@ main (argc, argv)
static void static void
v_fatal (str, ap) v_fatal (const char *str, va_list ap)
const char * str;
va_list ap;
{ {
fprintf (stderr, "%s: %s: ", progname, inc_filename); fprintf (stderr, "%s: %s: ", progname, inc_filename);
vfprintf (stderr, str, ap); vfprintf (stderr, str, ap);
......
/* fp-test.c - Check that all floating-point operations are available. /* fp-test.c - Check that all floating-point operations are available.
Copyright (C) 1995, 2000 Free Software Foundation, Inc. Copyright (C) 1995, 2000, 2003 Free Software Foundation, Inc.
Contributed by Ronald F. Guilmette <rfg@monkeys.com>. Contributed by Ronald F. Guilmette <rfg@monkeys.com>.
This file is part of GCC. This file is part of GCC.
...@@ -83,7 +83,7 @@ volatile double d1 = 1.0, d2 = 1.0, d3 = 1.0; ...@@ -83,7 +83,7 @@ volatile double d1 = 1.0, d2 = 1.0, d3 = 1.0;
volatile long double D1 = 1.0, D2 = 1.0, D3 = 1.0; volatile long double D1 = 1.0, D2 = 1.0, D3 = 1.0;
int int
main () main (void)
{ {
/* TYPE: float */ /* TYPE: float */
......
...@@ -71,44 +71,44 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -71,44 +71,44 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define CPLUS_FILE_SUFFIX "C" #define CPLUS_FILE_SUFFIX "C"
#endif #endif
static void usage PARAMS ((void)) ATTRIBUTE_NORETURN; static void usage (void) ATTRIBUTE_NORETURN;
static void aux_info_corrupted PARAMS ((void)) ATTRIBUTE_NORETURN; static void aux_info_corrupted (void) ATTRIBUTE_NORETURN;
static void declare_source_confusing PARAMS ((const char *)) ATTRIBUTE_NORETURN; static void declare_source_confusing (const char *) ATTRIBUTE_NORETURN;
static const char *shortpath PARAMS ((const char *, const char *)); static const char *shortpath (const char *, const char *);
extern void fancy_abort PARAMS ((void)) ATTRIBUTE_NORETURN; extern void fancy_abort (void) ATTRIBUTE_NORETURN;
static void notice PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1; static void notice (const char *, ...) ATTRIBUTE_PRINTF_1;
static char *savestring PARAMS ((const char *, unsigned int)); static char *savestring (const char *, unsigned int);
static char *dupnstr PARAMS ((const char *, size_t)); static char *dupnstr (const char *, size_t);
static const char *substr PARAMS ((const char *, const char * const)); static const char *substr (const char *, const char * const);
static int safe_read PARAMS ((int, void *, int)); static int safe_read (int, void *, int);
static void safe_write PARAMS ((int, void *, int, const char *)); static void safe_write (int, void *, int, const char *);
static void save_pointers PARAMS ((void)); static void save_pointers (void);
static void restore_pointers PARAMS ((void)); static void restore_pointers (void);
static int is_id_char PARAMS ((int)); static int is_id_char (int);
static int in_system_include_dir PARAMS ((const char *)); static int in_system_include_dir (const char *);
static int directory_specified_p PARAMS ((const char *)); static int directory_specified_p (const char *);
static int file_excluded_p PARAMS ((const char *)); static int file_excluded_p (const char *);
static char *unexpand_if_needed PARAMS ((const char *)); static char *unexpand_if_needed (const char *);
static char *abspath PARAMS ((const char *, const char *)); static char *abspath (const char *, const char *);
static void check_aux_info PARAMS ((int)); static void check_aux_info (int);
static const char *find_corresponding_lparen PARAMS ((const char *)); static const char *find_corresponding_lparen (const char *);
static int referenced_file_is_newer PARAMS ((const char *, time_t)); static int referenced_file_is_newer (const char *, time_t);
static void save_def_or_dec PARAMS ((const char *, int)); static void save_def_or_dec (const char *, int);
static void munge_compile_params PARAMS ((const char *)); static void munge_compile_params (const char *);
static int gen_aux_info_file PARAMS ((const char *)); static int gen_aux_info_file (const char *);
static void process_aux_info_file PARAMS ((const char *, int, int)); static void process_aux_info_file (const char *, int, int);
static int identify_lineno PARAMS ((const char *)); static int identify_lineno (const char *);
static void check_source PARAMS ((int, const char *)); static void check_source (int, const char *);
static const char *seek_to_line PARAMS ((int)); static const char *seek_to_line (int);
static const char *forward_to_next_token_char PARAMS ((const char *)); static const char *forward_to_next_token_char (const char *);
static void output_bytes PARAMS ((const char *, size_t)); static void output_bytes (const char *, size_t);
static void output_string PARAMS ((const char *)); static void output_string (const char *);
static void output_up_to PARAMS ((const char *)); static void output_up_to (const char *);
static int other_variable_style_function PARAMS ((const char *)); static int other_variable_style_function (const char *);
static const char *find_rightmost_formals_list PARAMS ((const char *)); static const char *find_rightmost_formals_list (const char *);
static void do_cleaning PARAMS ((char *, const char *)); static void do_cleaning (char *, const char *);
static const char *careful_find_l_paren PARAMS ((const char *)); static const char *careful_find_l_paren (const char *);
static void do_processing PARAMS ((void)); static void do_processing (void);
/* Look for these where the `const' qualifier is intentionally cast aside. */ /* Look for these where the `const' qualifier is intentionally cast aside. */
#define NONCONST #define NONCONST
...@@ -196,8 +196,8 @@ struct string_list ...@@ -196,8 +196,8 @@ struct string_list
struct string_list *next; struct string_list *next;
}; };
static struct string_list *string_list_cons PARAMS ((const char *, static struct string_list *string_list_cons (const char *,
struct string_list *)); struct string_list *);
/* List of directories in which files should be converted. */ /* List of directories in which files should be converted. */
...@@ -242,29 +242,29 @@ typedef struct file_info_struct file_info; ...@@ -242,29 +242,29 @@ typedef struct file_info_struct file_info;
typedef struct f_list_chain_item_struct f_list_chain_item; typedef struct f_list_chain_item_struct f_list_chain_item;
#ifndef UNPROTOIZE #ifndef UNPROTOIZE
static int is_syscalls_file PARAMS ((const file_info *)); static int is_syscalls_file (const file_info *);
static void rename_c_file PARAMS ((const hash_table_entry *)); static void rename_c_file (const hash_table_entry *);
static const def_dec_info *find_extern_def PARAMS ((const def_dec_info *, static const def_dec_info *find_extern_def (const def_dec_info *,
const def_dec_info *)); const def_dec_info *);
static const def_dec_info *find_static_definition PARAMS ((const def_dec_info *)); static const def_dec_info *find_static_definition (const def_dec_info *);
static void connect_defs_and_decs PARAMS ((const hash_table_entry *)); static void connect_defs_and_decs (const hash_table_entry *);
static void add_local_decl PARAMS ((const def_dec_info *, const char *)); static void add_local_decl (const def_dec_info *, const char *);
static void add_global_decls PARAMS ((const file_info *, const char *)); static void add_global_decls (const file_info *, const char *);
#endif /* ! UNPROTOIZE */ #endif /* ! UNPROTOIZE */
static int needs_to_be_converted PARAMS ((const file_info *)); static int needs_to_be_converted (const file_info *);
static void visit_each_hash_node PARAMS ((const hash_table_entry *, static void visit_each_hash_node (const hash_table_entry *,
void (*)(const hash_table_entry *))); void (*)(const hash_table_entry *));
static hash_table_entry *add_symbol PARAMS ((hash_table_entry *, const char *)); static hash_table_entry *add_symbol (hash_table_entry *, const char *);
static hash_table_entry *lookup PARAMS ((hash_table_entry *, const char *)); static hash_table_entry *lookup (hash_table_entry *, const char *);
static void free_def_dec PARAMS ((def_dec_info *)); static void free_def_dec (def_dec_info *);
static file_info *find_file PARAMS ((const char *, int)); static file_info *find_file (const char *, int);
static void reverse_def_dec_list PARAMS ((const hash_table_entry *)); static void reverse_def_dec_list (const hash_table_entry *);
static void edit_fn_declaration PARAMS ((const def_dec_info *, const char *)); static void edit_fn_declaration (const def_dec_info *, const char *);
static int edit_formals_lists PARAMS ((const char *, unsigned int, static int edit_formals_lists (const char *, unsigned int,
const def_dec_info *)); const def_dec_info *);
static void edit_fn_definition PARAMS ((const def_dec_info *, const char *)); static void edit_fn_definition (const def_dec_info *, const char *);
static void scan_for_missed_items PARAMS ((const file_info *)); static void scan_for_missed_items (const file_info *);
static void edit_file PARAMS ((const hash_table_entry *)); static void edit_file (const hash_table_entry *);
/* In the struct below, note that the "_info" field has two different uses /* In the struct below, note that the "_info" field has two different uses
depending on the type of hash table we are in (i.e. either the filenames depending on the type of hash table we are in (i.e. either the filenames
...@@ -519,9 +519,7 @@ notice (const char *msgid, ...) ...@@ -519,9 +519,7 @@ notice (const char *msgid, ...)
/* Make a copy of a string INPUT with size SIZE. */ /* Make a copy of a string INPUT with size SIZE. */
static char * static char *
savestring (input, size) savestring (const char *input, unsigned int size)
const char *input;
unsigned int size;
{ {
char *output = (char *) xmalloc (size + 1); char *output = (char *) xmalloc (size + 1);
strcpy (output, input); strcpy (output, input);
...@@ -532,7 +530,7 @@ savestring (input, size) ...@@ -532,7 +530,7 @@ savestring (input, size)
config.h can #define abort fancy_abort if you like that sort of thing. */ config.h can #define abort fancy_abort if you like that sort of thing. */
void void
fancy_abort () fancy_abort (void)
{ {
notice ("%s: internal abort\n", pname); notice ("%s: internal abort\n", pname);
exit (FATAL_EXIT_CODE); exit (FATAL_EXIT_CODE);
...@@ -542,9 +540,7 @@ fancy_abort () ...@@ -542,9 +540,7 @@ fancy_abort ()
allocated area. */ allocated area. */
static char * static char *
dupnstr (s, n) dupnstr (const char *s, size_t n)
const char *s;
size_t n;
{ {
char *ret_val = (char *) xmalloc (n + 1); char *ret_val = (char *) xmalloc (n + 1);
...@@ -557,9 +553,7 @@ dupnstr (s, n) ...@@ -557,9 +553,7 @@ dupnstr (s, n)
does not occur within s1. Assume neither s1 nor s2 are null pointers. */ does not occur within s1. Assume neither s1 nor s2 are null pointers. */
static const char * static const char *
substr (s1, s2) substr (const char *s1, const char *const s2)
const char *s1;
const char *const s2;
{ {
for (; *s1 ; s1++) for (; *s1 ; s1++)
{ {
...@@ -581,10 +575,7 @@ outer: ...@@ -581,10 +575,7 @@ outer:
retrying if necessary. Return the actual number of bytes read. */ retrying if necessary. Return the actual number of bytes read. */
static int static int
safe_read (desc, ptr, len) safe_read (int desc, void *ptr, int len)
int desc;
void *ptr;
int len;
{ {
int left = len; int left = len;
while (left > 0) { while (left > 0) {
...@@ -610,11 +601,7 @@ safe_read (desc, ptr, len) ...@@ -610,11 +601,7 @@ safe_read (desc, ptr, len)
retrying if necessary, and treating any real error as fatal. */ retrying if necessary, and treating any real error as fatal. */
static void static void
safe_write (desc, ptr, len, out_fname) safe_write (int desc, void *ptr, int len, const char *out_fname)
int desc;
void *ptr;
int len;
const char *out_fname;
{ {
while (len > 0) { while (len > 0) {
int written = write (desc, ptr, len); int written = write (desc, ptr, len);
...@@ -638,7 +625,7 @@ safe_write (desc, ptr, len, out_fname) ...@@ -638,7 +625,7 @@ safe_write (desc, ptr, len, out_fname)
/* Get setup to recover in case the edit we are about to do goes awry. */ /* Get setup to recover in case the edit we are about to do goes awry. */
static void static void
save_pointers () save_pointers (void)
{ {
saved_clean_read_ptr = clean_read_ptr; saved_clean_read_ptr = clean_read_ptr;
saved_repl_write_ptr = repl_write_ptr; saved_repl_write_ptr = repl_write_ptr;
...@@ -648,7 +635,7 @@ save_pointers () ...@@ -648,7 +635,7 @@ save_pointers ()
too confusing in the source code we are trying to edit. */ too confusing in the source code we are trying to edit. */
static void static void
restore_pointers () restore_pointers (void)
{ {
clean_read_ptr = saved_clean_read_ptr; clean_read_ptr = saved_clean_read_ptr;
repl_write_ptr = saved_repl_write_ptr; repl_write_ptr = saved_repl_write_ptr;
...@@ -657,8 +644,7 @@ restore_pointers () ...@@ -657,8 +644,7 @@ restore_pointers ()
/* Return true if the given character is a valid identifier character. */ /* Return true if the given character is a valid identifier character. */
static int static int
is_id_char (ch) is_id_char (int ch)
int ch;
{ {
return (ISIDNUM (ch) || (ch == '$')); return (ISIDNUM (ch) || (ch == '$'));
} }
...@@ -667,7 +653,7 @@ is_id_char (ch) ...@@ -667,7 +653,7 @@ is_id_char (ch)
exit with nonzero status. */ exit with nonzero status. */
static void static void
usage () usage (void)
{ {
#ifdef UNPROTOIZE #ifdef UNPROTOIZE
notice ("%s: usage '%s [ -VqfnkN ] [ -i <istring> ] [ filename ... ]'\n", notice ("%s: usage '%s [ -VqfnkN ] [ -i <istring> ] [ filename ... ]'\n",
...@@ -684,8 +670,7 @@ usage () ...@@ -684,8 +670,7 @@ usage ()
include directories. */ include directories. */
static int static int
in_system_include_dir (path) in_system_include_dir (const char *path)
const char *path;
{ {
const struct default_include *p; const struct default_include *p;
...@@ -811,8 +796,7 @@ file_normally_convertible (const char *path) ...@@ -811,8 +796,7 @@ file_normally_convertible (const char *path)
file. Return false otherwise. */ file. Return false otherwise. */
static int static int
is_syscalls_file (fi_p) is_syscalls_file (const file_info *fi_p)
const file_info *fi_p;
{ {
char const *f = fi_p->hash_entry->symbol; char const *f = fi_p->hash_entry->symbol;
size_t fl = strlen (f), sysl = sizeof (syscalls_filename) - 1; size_t fl = strlen (f), sysl = sizeof (syscalls_filename) - 1;
...@@ -831,8 +815,7 @@ is_syscalls_file (fi_p) ...@@ -831,8 +815,7 @@ is_syscalls_file (fi_p)
by connect_defs_and_decs. */ by connect_defs_and_decs. */
static int static int
needs_to_be_converted (file_p) needs_to_be_converted (const file_info *file_p)
const file_info *file_p;
{ {
const def_dec_info *ddp; const def_dec_info *ddp;
...@@ -870,8 +853,7 @@ needs_to_be_converted (file_p) ...@@ -870,8 +853,7 @@ needs_to_be_converted (file_p)
that should be converted. */ that should be converted. */
static int static int
directory_specified_p (name) directory_specified_p (const char *name)
const char *name;
{ {
struct string_list *p; struct string_list *p;
...@@ -897,8 +879,7 @@ directory_specified_p (name) ...@@ -897,8 +879,7 @@ directory_specified_p (name)
/* Return 1 if the file named NAME should be excluded from conversion. */ /* Return 1 if the file named NAME should be excluded from conversion. */
static int static int
file_excluded_p (name) file_excluded_p (const char *name)
const char *name;
{ {
struct string_list *p; struct string_list *p;
int len = strlen (name); int len = strlen (name);
...@@ -915,9 +896,7 @@ file_excluded_p (name) ...@@ -915,9 +896,7 @@ file_excluded_p (name)
STRING is the new element value, and REST holds the remaining elements. */ STRING is the new element value, and REST holds the remaining elements. */
static struct string_list * static struct string_list *
string_list_cons (string, rest) string_list_cons (const char *string, struct string_list *rest)
const char *string;
struct string_list *rest;
{ {
struct string_list *temp struct string_list *temp
= (struct string_list *) xmalloc (sizeof (struct string_list)); = (struct string_list *) xmalloc (sizeof (struct string_list));
...@@ -937,9 +916,8 @@ string_list_cons (string, rest) ...@@ -937,9 +916,8 @@ string_list_cons (string, rest)
argument. */ argument. */
static void static void
visit_each_hash_node (hash_tab_p, func) visit_each_hash_node (const hash_table_entry *hash_tab_p,
const hash_table_entry *hash_tab_p; void (*func) (const hash_table_entry *))
void (*func) PARAMS ((const hash_table_entry *));
{ {
const hash_table_entry *primary; const hash_table_entry *primary;
...@@ -960,9 +938,7 @@ visit_each_hash_node (hash_tab_p, func) ...@@ -960,9 +938,7 @@ visit_each_hash_node (hash_tab_p, func)
called. */ called. */
static hash_table_entry * static hash_table_entry *
add_symbol (p, s) add_symbol (hash_table_entry *p, const char *s)
hash_table_entry *p;
const char *s;
{ {
p->hash_next = NULL; p->hash_next = NULL;
p->symbol = xstrdup (s); p->symbol = xstrdup (s);
...@@ -977,9 +953,7 @@ add_symbol (p, s) ...@@ -977,9 +953,7 @@ add_symbol (p, s)
hash table entry for the given name. */ hash table entry for the given name. */
static hash_table_entry * static hash_table_entry *
lookup (hash_tab_p, search_symbol) lookup (hash_table_entry *hash_tab_p, const char *search_symbol)
hash_table_entry *hash_tab_p;
const char *search_symbol;
{ {
int hash_value = 0; int hash_value = 0;
const char *search_symbol_char_p = search_symbol; const char *search_symbol_char_p = search_symbol;
...@@ -1010,8 +984,7 @@ lookup (hash_tab_p, search_symbol) ...@@ -1010,8 +984,7 @@ lookup (hash_tab_p, search_symbol)
stuff it pointed to. */ stuff it pointed to. */
static void static void
free_def_dec (p) free_def_dec (def_dec_info *p)
def_dec_info *p;
{ {
free ((NONCONST void *) p->ansi_decl); free ((NONCONST void *) p->ansi_decl);
...@@ -1037,8 +1010,7 @@ free_def_dec (p) ...@@ -1037,8 +1010,7 @@ free_def_dec (p)
return a pointer to the unexpanded copy. Otherwise return NULL. */ return a pointer to the unexpanded copy. Otherwise return NULL. */
static char * static char *
unexpand_if_needed (aux_info_line) unexpand_if_needed (const char *aux_info_line)
const char *aux_info_line;
{ {
static char *line_buf = 0; static char *line_buf = 0;
static int line_buf_size = 0; static int line_buf_size = 0;
...@@ -1120,9 +1092,7 @@ continue_outer: ; ...@@ -1120,9 +1092,7 @@ continue_outer: ;
NULL. */ NULL. */
static char * static char *
abspath (cwd, rel_filename) abspath (const char *cwd, const char *rel_filename)
const char *cwd;
const char *rel_filename;
{ {
/* Setup the current working directory as needed. */ /* Setup the current working directory as needed. */
const char *const cwd2 = (cwd) ? cwd : cwd_buffer; const char *const cwd2 = (cwd) ? cwd : cwd_buffer;
...@@ -1239,9 +1209,7 @@ abspath (cwd, rel_filename) ...@@ -1239,9 +1209,7 @@ abspath (cwd, rel_filename)
subpart of the original filename is actually a symbolic link. */ subpart of the original filename is actually a symbolic link. */
static const char * static const char *
shortpath (cwd, filename) shortpath (const char *cwd, const char *filename)
const char *cwd;
const char *filename;
{ {
char *rel_buffer; char *rel_buffer;
char *rel_buf_p; char *rel_buf_p;
...@@ -1328,9 +1296,7 @@ shortpath (cwd, filename) ...@@ -1328,9 +1296,7 @@ shortpath (cwd, filename)
That is probably a bug in AIX, but might as well avoid the warning. */ That is probably a bug in AIX, but might as well avoid the warning. */
static file_info * static file_info *
find_file (filename, do_not_stat) find_file (const char *filename, int do_not_stat)
const char *filename;
int do_not_stat;
{ {
hash_table_entry *hash_entry_p; hash_table_entry *hash_entry_p;
...@@ -1371,7 +1337,7 @@ find_file (filename, do_not_stat) ...@@ -1371,7 +1337,7 @@ find_file (filename, do_not_stat)
messed up. */ messed up. */
static void static void
aux_info_corrupted () aux_info_corrupted (void)
{ {
notice ("\n%s: fatal error: aux info file corrupted at line %d\n", notice ("\n%s: fatal error: aux info file corrupted at line %d\n",
pname, current_aux_info_lineno); pname, current_aux_info_lineno);
...@@ -1382,8 +1348,7 @@ aux_info_corrupted () ...@@ -1382,8 +1348,7 @@ aux_info_corrupted ()
/* Check to see that a condition is true. This is kind of like an assert. */ /* Check to see that a condition is true. This is kind of like an assert. */
static void static void
check_aux_info (cond) check_aux_info (int cond)
int cond;
{ {
if (! cond) if (! cond)
aux_info_corrupted (); aux_info_corrupted ();
...@@ -1394,8 +1359,7 @@ check_aux_info (cond) ...@@ -1394,8 +1359,7 @@ check_aux_info (cond)
return a pointer to it. */ return a pointer to it. */
static const char * static const char *
find_corresponding_lparen (p) find_corresponding_lparen (const char *p)
const char *p;
{ {
const char *q; const char *q;
int paren_depth; int paren_depth;
...@@ -1421,9 +1385,7 @@ find_corresponding_lparen (p) ...@@ -1421,9 +1385,7 @@ find_corresponding_lparen (p)
file was created. If so, return nonzero, else return zero. */ file was created. If so, return nonzero, else return zero. */
static int static int
referenced_file_is_newer (l, aux_info_mtime) referenced_file_is_newer (const char *l, time_t aux_info_mtime)
const char *l;
time_t aux_info_mtime;
{ {
const char *p; const char *p;
file_info *fi_p; file_info *fi_p;
...@@ -1473,9 +1435,7 @@ referenced_file_is_newer (l, aux_info_mtime) ...@@ -1473,9 +1435,7 @@ referenced_file_is_newer (l, aux_info_mtime)
pertaining to this particular function name. */ pertaining to this particular function name. */
static void static void
save_def_or_dec (l, is_syscalls) save_def_or_dec (const char *l, int is_syscalls)
const char *l;
int is_syscalls;
{ {
const char *p; const char *p;
const char *semicolon_p; const char *semicolon_p;
...@@ -1868,8 +1828,7 @@ save_def_or_dec (l, is_syscalls) ...@@ -1868,8 +1828,7 @@ save_def_or_dec (l, is_syscalls)
and adding '-aux-info AUXFILE -S -o /dev/null INFILE' at the end. */ and adding '-aux-info AUXFILE -S -o /dev/null INFILE' at the end. */
static void static void
munge_compile_params (params_list) munge_compile_params (const char *params_list)
const char *params_list;
{ {
/* Build up the contents in a temporary vector /* Build up the contents in a temporary vector
that is so big that to has to be big enough. */ that is so big that to has to be big enough. */
...@@ -1954,8 +1913,7 @@ munge_compile_params (params_list) ...@@ -1954,8 +1913,7 @@ munge_compile_params (params_list)
The result is a boolean indicating success. */ The result is a boolean indicating success. */
static int static int
gen_aux_info_file (base_filename) gen_aux_info_file (const char *base_filename)
const char *base_filename;
{ {
if (!input_file_name_index) if (!input_file_name_index)
munge_compile_params (""); munge_compile_params ("");
...@@ -2017,10 +1975,8 @@ gen_aux_info_file (base_filename) ...@@ -2017,10 +1975,8 @@ gen_aux_info_file (base_filename)
Save all of the important stuff for later. */ Save all of the important stuff for later. */
static void static void
process_aux_info_file (base_source_filename, keep_it, is_syscalls) process_aux_info_file (const char *base_source_filename, int keep_it,
const char *base_source_filename; int is_syscalls)
int keep_it;
int is_syscalls;
{ {
size_t base_len = strlen (base_source_filename); size_t base_len = strlen (base_source_filename);
char * aux_info_filename char * aux_info_filename
...@@ -2349,8 +2305,7 @@ start_over: ; ...@@ -2349,8 +2305,7 @@ start_over: ;
function implements the -C option. */ function implements the -C option. */
static void static void
rename_c_file (hp) rename_c_file (const hash_table_entry *hp)
const hash_table_entry *hp;
{ {
const char *filename = hp->symbol; const char *filename = hp->symbol;
int last_char_index = strlen (filename) - 1; int last_char_index = strlen (filename) - 1;
...@@ -2392,8 +2347,7 @@ rename_c_file (hp) ...@@ -2392,8 +2347,7 @@ rename_c_file (hp)
order here. */ order here. */
static void static void
reverse_def_dec_list (hp) reverse_def_dec_list (const hash_table_entry *hp)
const hash_table_entry *hp;
{ {
file_info *file_p = hp->fip; file_info *file_p = hp->fip;
def_dec_info *prev = NULL; def_dec_info *prev = NULL;
...@@ -2434,9 +2388,7 @@ reverse_def_dec_list (hp) ...@@ -2434,9 +2388,7 @@ reverse_def_dec_list (hp)
contains all of the correct prototypes for system functions. */ contains all of the correct prototypes for system functions. */
static const def_dec_info * static const def_dec_info *
find_extern_def (head, user) find_extern_def (const def_dec_info *head, const def_dec_info *user)
const def_dec_info *head;
const def_dec_info *user;
{ {
const def_dec_info *dd_p; const def_dec_info *dd_p;
const def_dec_info *extern_def_p = NULL; const def_dec_info *extern_def_p = NULL;
...@@ -2597,8 +2549,7 @@ find_extern_def (head, user) ...@@ -2597,8 +2549,7 @@ find_extern_def (head, user)
from the def_dec_info record pointer which is passed in. */ from the def_dec_info record pointer which is passed in. */
static const def_dec_info * static const def_dec_info *
find_static_definition (user) find_static_definition (const def_dec_info *user)
const def_dec_info *user;
{ {
const def_dec_info *head = user->hash_entry->ddip; const def_dec_info *head = user->hash_entry->ddip;
const def_dec_info *dd_p; const def_dec_info *dd_p;
...@@ -2647,8 +2598,7 @@ find_static_definition (user) ...@@ -2647,8 +2598,7 @@ find_static_definition (user)
more details. */ more details. */
static void static void
connect_defs_and_decs (hp) connect_defs_and_decs (const hash_table_entry *hp)
const hash_table_entry *hp;
{ {
const def_dec_info *dd_p; const def_dec_info *dd_p;
const def_dec_info *extern_def_p = NULL; const def_dec_info *extern_def_p = NULL;
...@@ -2772,8 +2722,7 @@ connect_defs_and_decs (hp) ...@@ -2772,8 +2722,7 @@ connect_defs_and_decs (hp)
original source line number that the given pointer points into. */ original source line number that the given pointer points into. */
static int static int
identify_lineno (clean_p) identify_lineno (const char *clean_p)
const char *clean_p;
{ {
int line_num = 1; int line_num = 1;
const char *scan_p; const char *scan_p;
...@@ -2787,8 +2736,7 @@ identify_lineno (clean_p) ...@@ -2787,8 +2736,7 @@ identify_lineno (clean_p)
/* Issue an error message and give up on doing this particular edit. */ /* Issue an error message and give up on doing this particular edit. */
static void static void
declare_source_confusing (clean_p) declare_source_confusing (const char *clean_p)
const char *clean_p;
{ {
if (!quiet_flag) if (!quiet_flag)
{ {
...@@ -2808,9 +2756,7 @@ declare_source_confusing (clean_p) ...@@ -2808,9 +2756,7 @@ declare_source_confusing (clean_p)
converting this particular source file. */ converting this particular source file. */
static void static void
check_source (cond, clean_p) check_source (int cond, const char *clean_p)
int cond;
const char *clean_p;
{ {
if (!cond) if (!cond)
declare_source_confusing (clean_p); declare_source_confusing (clean_p);
...@@ -2832,8 +2778,7 @@ check_source (cond, clean_p) ...@@ -2832,8 +2778,7 @@ check_source (cond, clean_p)
of the in-core cleaned buffer again. */ of the in-core cleaned buffer again. */
static const char * static const char *
seek_to_line (n) seek_to_line (int n)
int n;
{ {
if (n < last_known_line_number) if (n < last_known_line_number)
abort (); abort ();
...@@ -2852,8 +2797,7 @@ seek_to_line (n) ...@@ -2852,8 +2797,7 @@ seek_to_line (n)
to the next non-whitespace character which follows it. */ to the next non-whitespace character which follows it. */
static const char * static const char *
forward_to_next_token_char (ptr) forward_to_next_token_char (const char *ptr)
const char *ptr;
{ {
for (++ptr; ISSPACE ((const unsigned char)*ptr); for (++ptr; ISSPACE ((const unsigned char)*ptr);
check_source (++ptr < clean_text_limit, 0)) check_source (++ptr < clean_text_limit, 0))
...@@ -2866,9 +2810,7 @@ forward_to_next_token_char (ptr) ...@@ -2866,9 +2810,7 @@ forward_to_next_token_char (ptr)
buffer ultimately go through here. */ buffer ultimately go through here. */
static void static void
output_bytes (str, len) output_bytes (const char *str, size_t len)
const char *str;
size_t len;
{ {
if ((repl_write_ptr + 1) + len >= repl_text_limit) if ((repl_write_ptr + 1) + len >= repl_text_limit)
{ {
...@@ -2887,8 +2829,7 @@ output_bytes (str, len) ...@@ -2887,8 +2829,7 @@ output_bytes (str, len)
the current output buffer. */ the current output buffer. */
static void static void
output_string (str) output_string (const char *str)
const char *str;
{ {
output_bytes (str, strlen (str)); output_bytes (str, strlen (str));
} }
...@@ -2913,8 +2854,7 @@ output_string (str) ...@@ -2913,8 +2854,7 @@ output_string (str)
byte pointed to by the argument pointer `p'. */ byte pointed to by the argument pointer `p'. */
static void static void
output_up_to (p) output_up_to (const char *p)
const char *p;
{ {
size_t copy_length = (size_t) (p - clean_read_ptr); size_t copy_length = (size_t) (p - clean_read_ptr);
const char *copy_start = orig_text_base+(clean_read_ptr-clean_text_base)+1; const char *copy_start = orig_text_base+(clean_read_ptr-clean_text_base)+1;
...@@ -2933,8 +2873,7 @@ output_up_to (p) ...@@ -2933,8 +2873,7 @@ output_up_to (p)
otherwise. */ otherwise. */
static int static int
other_variable_style_function (ansi_header) other_variable_style_function (const char *ansi_header)
const char *ansi_header;
{ {
#ifdef UNPROTOIZE #ifdef UNPROTOIZE
...@@ -2972,9 +2911,8 @@ other_variable_style_function (ansi_header) ...@@ -2972,9 +2911,8 @@ other_variable_style_function (ansi_header)
below. */ below. */
static void static void
edit_fn_declaration (def_dec_p, clean_text_p) edit_fn_declaration (const def_dec_info *def_dec_p,
const def_dec_info *def_dec_p; const char *volatile clean_text_p)
const char *volatile clean_text_p;
{ {
const char *start_formals; const char *start_formals;
const char *end_formals; const char *end_formals;
...@@ -3188,10 +3126,8 @@ edit_fn_declaration (def_dec_p, clean_text_p) ...@@ -3188,10 +3126,8 @@ edit_fn_declaration (def_dec_p, clean_text_p)
function doesn't match the one expected). */ function doesn't match the one expected). */
static int static int
edit_formals_lists (end_formals, f_list_count, def_dec_p) edit_formals_lists (const char *end_formals, unsigned int f_list_count,
const char *end_formals; const def_dec_info *def_dec_p)
unsigned int f_list_count;
const def_dec_info *def_dec_p;
{ {
const char *start_formals; const char *start_formals;
int depth; int depth;
...@@ -3299,8 +3235,7 @@ edit_formals_lists (end_formals, f_list_count, def_dec_p) ...@@ -3299,8 +3235,7 @@ edit_formals_lists (end_formals, f_list_count, def_dec_p)
definition header. */ definition header. */
static const char * static const char *
find_rightmost_formals_list (clean_text_p) find_rightmost_formals_list (const char *clean_text_p)
const char *clean_text_p;
{ {
const char *end_formals; const char *end_formals;
...@@ -3417,9 +3352,7 @@ find_rightmost_formals_list (clean_text_p) ...@@ -3417,9 +3352,7 @@ find_rightmost_formals_list (clean_text_p)
parameter type checking. */ parameter type checking. */
static void static void
add_local_decl (def_dec_p, clean_text_p) add_local_decl (const def_dec_info *def_dec_p, const char *clean_text_p)
const def_dec_info *def_dec_p;
const char *clean_text_p;
{ {
const char *start_of_block; const char *start_of_block;
const char *function_to_edit = def_dec_p->hash_entry->symbol; const char *function_to_edit = def_dec_p->hash_entry->symbol;
...@@ -3524,9 +3457,7 @@ add_local_decl (def_dec_p, clean_text_p) ...@@ -3524,9 +3457,7 @@ add_local_decl (def_dec_p, clean_text_p)
and then insert the new explicit declaration at that point in the file. */ and then insert the new explicit declaration at that point in the file. */
static void static void
add_global_decls (file_p, clean_text_p) add_global_decls (const file_info *file_p, const char *clean_text_p)
const file_info *file_p;
const char *clean_text_p;
{ {
const def_dec_info *dd_p; const def_dec_info *dd_p;
const char *scan_p; const char *scan_p;
...@@ -3615,9 +3546,7 @@ add_global_decls (file_p, clean_text_p) ...@@ -3615,9 +3546,7 @@ add_global_decls (file_p, clean_text_p)
separate routine above. */ separate routine above. */
static void static void
edit_fn_definition (def_dec_p, clean_text_p) edit_fn_definition (const def_dec_info *def_dec_p, const char *clean_text_p)
const def_dec_info *def_dec_p;
const char *clean_text_p;
{ {
const char *end_formals; const char *end_formals;
const char *function_to_edit = def_dec_p->hash_entry->symbol; const char *function_to_edit = def_dec_p->hash_entry->symbol;
...@@ -3759,9 +3688,7 @@ edit_fn_definition (def_dec_p, clean_text_p) ...@@ -3759,9 +3688,7 @@ edit_fn_definition (def_dec_p, clean_text_p)
into whitespace. Also, whiteout string and character literals. */ into whitespace. Also, whiteout string and character literals. */
static void static void
do_cleaning (new_clean_text_base, new_clean_text_limit) do_cleaning (char *new_clean_text_base, const char *new_clean_text_limit)
char *new_clean_text_base;
const char *new_clean_text_limit;
{ {
char *scan_p; char *scan_p;
int non_whitespace_since_newline = 0; int non_whitespace_since_newline = 0;
...@@ -3865,8 +3792,7 @@ regular: ...@@ -3865,8 +3792,7 @@ regular:
and return a pointer to it. */ and return a pointer to it. */
static const char * static const char *
careful_find_l_paren (p) careful_find_l_paren (const char *p)
const char *p;
{ {
const char *q; const char *q;
int paren_depth; int paren_depth;
...@@ -3904,8 +3830,7 @@ careful_find_l_paren (p) ...@@ -3904,8 +3830,7 @@ careful_find_l_paren (p)
I will probably try to do this in a later version though. */ I will probably try to do this in a later version though. */
static void static void
scan_for_missed_items (file_p) scan_for_missed_items (const file_info *file_p)
const file_info *file_p;
{ {
static const char *scan_p; static const char *scan_p;
const char *limit = clean_text_limit - 3; const char *limit = clean_text_limit - 3;
...@@ -4020,8 +3945,7 @@ scan_for_missed_items (file_p) ...@@ -4020,8 +3945,7 @@ scan_for_missed_items (file_p)
preprocessing directives make the editing a whole lot easier. */ preprocessing directives make the editing a whole lot easier. */
static void static void
edit_file (hp) edit_file (const hash_table_entry *hp)
const hash_table_entry *hp;
{ {
struct stat stat_buf; struct stat stat_buf;
const file_info *file_p = hp->fip; const file_info *file_p = hp->fip;
...@@ -4360,7 +4284,7 @@ edit_file (hp) ...@@ -4360,7 +4284,7 @@ edit_file (hp)
in the command line. */ in the command line. */
static void static void
do_processing () do_processing (void)
{ {
const char * const *base_pp; const char * const *base_pp;
const char * const * const end_pps const char * const * const end_pps
...@@ -4485,12 +4409,10 @@ static const struct option longopts[] = ...@@ -4485,12 +4409,10 @@ static const struct option longopts[] =
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
extern int main PARAMS ((int, char **const)); extern int main (int, char **const);
int int
main (argc, argv) main (int argc, char **const argv)
int argc;
char **const argv;
{ {
int longind; int longind;
int c; int c;
......
/* Graph coloring register allocator /* Graph coloring register allocator
Copyright (C) 2001, 2002 Free Software Foundation, Inc. Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Michael Matz <matz@suse.de> Contributed by Michael Matz <matz@suse.de>
and Daniel Berlin <dan@cgsoftware.com>. and Daniel Berlin <dan@cgsoftware.com>.
...@@ -569,63 +569,61 @@ extern int flag_ra_spill_every_use; ...@@ -569,63 +569,61 @@ extern int flag_ra_spill_every_use;
/* Nonzero to output all notes in the debug dumps. */ /* Nonzero to output all notes in the debug dumps. */
extern int flag_ra_dump_notes; extern int flag_ra_dump_notes;
extern inline void * ra_alloc PARAMS ((size_t)); extern inline void * ra_alloc (size_t);
extern inline void * ra_calloc PARAMS ((size_t)); extern inline void * ra_calloc (size_t);
extern int hard_regs_count PARAMS ((HARD_REG_SET)); extern int hard_regs_count (HARD_REG_SET);
extern rtx ra_emit_move_insn PARAMS ((rtx, rtx)); extern rtx ra_emit_move_insn (rtx, rtx);
extern void ra_debug_msg PARAMS ((unsigned int, extern void ra_debug_msg (unsigned int, const char *, ...) ATTRIBUTE_PRINTF_2;
const char *, ...)) ATTRIBUTE_PRINTF_2; extern int hard_regs_intersect_p (HARD_REG_SET *, HARD_REG_SET *);
extern int hard_regs_intersect_p PARAMS ((HARD_REG_SET *, HARD_REG_SET *)); extern unsigned int rtx_to_bits (rtx);
extern unsigned int rtx_to_bits PARAMS ((rtx)); extern struct web * find_subweb (struct web *, rtx);
extern struct web * find_subweb PARAMS ((struct web *, rtx)); extern struct web * find_subweb_2 (struct web *, unsigned int);
extern struct web * find_subweb_2 PARAMS ((struct web *, unsigned int)); extern struct web * find_web_for_subweb_1 (struct web *);
extern struct web * find_web_for_subweb_1 PARAMS ((struct web *));
#define find_web_for_subweb(w) (((w)->parent_web) \ #define find_web_for_subweb(w) (((w)->parent_web) \
? find_web_for_subweb_1 ((w)->parent_web) \ ? find_web_for_subweb_1 ((w)->parent_web) \
: (w)) : (w))
extern void ra_build_realloc PARAMS ((struct df *)); extern void ra_build_realloc (struct df *);
extern void ra_build_free PARAMS ((void)); extern void ra_build_free (void);
extern void ra_build_free_all PARAMS ((struct df *)); extern void ra_build_free_all (struct df *);
extern void ra_colorize_init PARAMS ((void)); extern void ra_colorize_init (void);
extern void ra_colorize_free_all PARAMS ((void)); extern void ra_colorize_free_all (void);
extern void ra_rewrite_init PARAMS ((void)); extern void ra_rewrite_init (void);
extern void ra_print_rtx PARAMS ((FILE *, rtx, int)); extern void ra_print_rtx (FILE *, rtx, int);
extern void ra_print_rtx_top PARAMS ((FILE *, rtx, int)); extern void ra_print_rtx_top (FILE *, rtx, int);
extern void ra_debug_rtx PARAMS ((rtx)); extern void ra_debug_rtx (rtx);
extern void ra_debug_insns PARAMS ((rtx, int)); extern void ra_debug_insns (rtx, int);
extern void ra_debug_bbi PARAMS ((int)); extern void ra_debug_bbi (int);
extern void ra_print_rtl_with_bb PARAMS ((FILE *, rtx)); extern void ra_print_rtl_with_bb (FILE *, rtx);
extern void dump_igraph PARAMS ((struct df *)); extern void dump_igraph (struct df *);
extern void dump_igraph_machine PARAMS ((void)); extern void dump_igraph_machine (void);
extern void dump_constraints PARAMS ((void)); extern void dump_constraints (void);
extern void dump_cost PARAMS ((unsigned int)); extern void dump_cost (unsigned int);
extern void dump_graph_cost PARAMS ((unsigned int, const char *)); extern void dump_graph_cost (unsigned int, const char *);
extern void dump_ra PARAMS ((struct df *)); extern void dump_ra (struct df *);
extern void dump_number_seen PARAMS ((void)); extern void dump_number_seen (void);
extern void dump_static_insn_cost PARAMS ((FILE *, const char *, extern void dump_static_insn_cost (FILE *, const char *, const char *);
const char *)); extern void dump_web_conflicts (struct web *);
extern void dump_web_conflicts PARAMS ((struct web *)); extern void dump_web_insns (struct web*);
extern void dump_web_insns PARAMS ((struct web*)); extern int web_conflicts_p (struct web *, struct web *);
extern int web_conflicts_p PARAMS ((struct web *, struct web *)); extern void debug_hard_reg_set (HARD_REG_SET);
extern void debug_hard_reg_set PARAMS ((HARD_REG_SET));
extern void remove_list (struct dlist *, struct dlist **);
extern void remove_list PARAMS ((struct dlist *, struct dlist **)); extern struct dlist * pop_list (struct dlist **);
extern struct dlist * pop_list PARAMS ((struct dlist **)); extern void record_conflict (struct web *, struct web *);
extern void record_conflict PARAMS ((struct web *, struct web *)); extern int memref_is_stack_slot (rtx);
extern int memref_is_stack_slot PARAMS ((rtx)); extern void build_i_graph (struct df *);
extern void build_i_graph PARAMS ((struct df *)); extern void put_web (struct web *, enum node_type);
extern void put_web PARAMS ((struct web *, enum node_type)); extern void remove_web_from_list (struct web *);
extern void remove_web_from_list PARAMS ((struct web *)); extern void reset_lists (void);
extern void reset_lists PARAMS ((void)); extern struct web * alias (struct web *);
extern struct web * alias PARAMS ((struct web *)); extern void merge_moves (struct web *, struct web *);
extern void merge_moves PARAMS ((struct web *, struct web *)); extern void ra_colorize_graph (struct df *);
extern void ra_colorize_graph PARAMS ((struct df *));
extern void actual_spill (void);
extern void actual_spill PARAMS ((void)); extern void emit_colors (struct df *);
extern void emit_colors PARAMS ((struct df *)); extern void delete_moves (void);
extern void delete_moves PARAMS ((void)); extern void setup_renumber (int);
extern void setup_renumber PARAMS ((int)); extern void remove_suspicious_death_notes (void);
extern void remove_suspicious_death_notes PARAMS ((void));
#include "ansidecl.h"
#include "version.h" #include "version.h"
/* This is the string reported as the version number by all components /* This is the string reported as the version number by all components
......
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