Commit 7adfcfed by Kaveh R. Ghazi Committed by Kaveh Ghazi

rtl.h (get_insn_name, [...]): Add prototypes.

	* rtl.h (get_insn_name, print_rtl_with_bb): Add prototypes.

	* print-rtl.c (get_insn_name): Remove prototype.

	* toplev.h (progname): Declare const.

	* toplev.c (init_decl_processing, init_obstacks, init_tree_codes,
	init_regs, init_optabs, init_stmt, init_reg_sets, dump_flow_info,
	dump_sched_info, dump_local_alloc, regset_release_memory,
	print_rtl, print_rtl_with_bb, rest_of_decl_compilation,
	error_with_file_and_line, error_with_decl, error_for_asm, error,
	fatal, warning_with_file_and_line, warning_with_decl, warning,
	pedwarn, pedwarn_with_decl, pedwarn_with_file_and_line, sorry):
	Remove redundant prototypes.

	(notice, check_lang_option, report_file_and_line, vnotice,
	mark_file_stack): Add static prototype.
	(set_fatal_function): Add prototype.
	(vnotice, report_file_and_line, set_fatal_function,
	check_lang_option): Constify a char*.
	(main): Prototype.  Call return, not exit.

cp:

	* typeck2.c (ack): Don't declare progname.

From-SVN: r29433
parent 04cabffc
Wed Sep 15 09:59:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* rtl.h (get_insn_name, print_rtl_with_bb): Add prototypes.
* print-rtl.c (get_insn_name): Remove prototype.
* toplev.h (progname): Declare const.
* toplev.c (init_decl_processing, init_obstacks, init_tree_codes,
init_regs, init_optabs, init_stmt, init_reg_sets, dump_flow_info,
dump_sched_info, dump_local_alloc, regset_release_memory,
print_rtl, print_rtl_with_bb, rest_of_decl_compilation,
error_with_file_and_line, error_with_decl, error_for_asm, error,
fatal, warning_with_file_and_line, warning_with_decl, warning,
pedwarn, pedwarn_with_decl, pedwarn_with_file_and_line, sorry):
Remove redundant prototypes.
(notice, check_lang_option, report_file_and_line, vnotice,
mark_file_stack): Add static prototype.
(set_fatal_function): Add prototype.
(vnotice, report_file_and_line, set_fatal_function,
check_lang_option): Constify a char*.
(main): Prototype. Call return, not exit.
Wed Sep 15 09:50:18 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Wed Sep 15 09:50:18 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* aclocal.m4 (AC_GCC_C_LONG_DOUBLE): New macro. * aclocal.m4 (AC_GCC_C_LONG_DOUBLE): New macro.
......
1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* typeck2.c (ack): Don't declare progname.
1999-09-15 Nathan Sidwell <nathan@acm.org> 1999-09-15 Nathan Sidwell <nathan@acm.org>
* typeck.c (expr_sizeof): Reinstall and augment OFFSET_REF * typeck.c (expr_sizeof): Reinstall and augment OFFSET_REF
......
...@@ -253,7 +253,6 @@ ack VPROTO ((const char *msg, ...)) ...@@ -253,7 +253,6 @@ ack VPROTO ((const char *msg, ...))
const char *msg; const char *msg;
#endif #endif
va_list ap; va_list ap;
extern char * progname;
VA_START (ap, msg); VA_START (ap, msg);
......
...@@ -52,10 +52,6 @@ static int sawclose = 0; ...@@ -52,10 +52,6 @@ static int sawclose = 0;
static int indent; static int indent;
/* Names for patterns. */
extern const char *get_insn_name PROTO ((int));
static void print_rtx PROTO ((rtx)); static void print_rtx PROTO ((rtx));
/* Nonzero means suppress output of instruction numbers and line number /* Nonzero means suppress output of instruction numbers and line number
......
...@@ -997,6 +997,7 @@ extern rtx make_safe_from PROTO((rtx, rtx)); ...@@ -997,6 +997,7 @@ extern rtx make_safe_from PROTO((rtx, rtx));
extern rtx convert_memory_address PROTO((enum machine_mode, rtx)); extern rtx convert_memory_address PROTO((enum machine_mode, rtx));
extern rtx memory_address PROTO((enum machine_mode, rtx)); extern rtx memory_address PROTO((enum machine_mode, rtx));
extern rtx get_insns PROTO((void)); extern rtx get_insns PROTO((void));
extern const char *get_insn_name PROTO((int));
extern rtx get_last_insn PROTO((void)); extern rtx get_last_insn PROTO((void));
extern rtx get_last_insn_anywhere PROTO((void)); extern rtx get_last_insn_anywhere PROTO((void));
extern void start_sequence PROTO((void)); extern void start_sequence PROTO((void));
...@@ -1530,6 +1531,7 @@ extern void allocate_bb_life_data PROTO ((void)); ...@@ -1530,6 +1531,7 @@ extern void allocate_bb_life_data PROTO ((void));
extern void allocate_reg_life_data PROTO ((void)); extern void allocate_reg_life_data PROTO ((void));
extern void recompute_reg_usage PROTO ((rtx, int)); extern void recompute_reg_usage PROTO ((rtx, int));
#ifdef BUFSIZ #ifdef BUFSIZ
extern void print_rtl_with_bb PROTO ((FILE *, rtx));
extern void dump_flow_info PROTO ((FILE *)); extern void dump_flow_info PROTO ((FILE *));
#endif #endif
extern void free_bb_mem PROTO ((void)); extern void free_bb_mem PROTO ((void));
......
...@@ -149,38 +149,7 @@ extern char *version_string; ...@@ -149,38 +149,7 @@ extern char *version_string;
extern int size_directive_output; extern int size_directive_output;
extern tree last_assemble_variable_decl; extern tree last_assemble_variable_decl;
extern void init_decl_processing (); static void notice PVPROTO((const char *s, ...)) ATTRIBUTE_PRINTF_1;
extern void init_obstacks ();
extern void init_tree_codes ();
extern void init_regs ();
extern void init_optabs ();
extern void init_stmt ();
extern void init_reg_sets ();
extern void dump_flow_info ();
extern void dump_sched_info ();
extern void dump_local_alloc ();
extern void regset_release_memory ();
extern void print_rtl ();
extern void print_rtl_with_bb ();
void rest_of_decl_compilation ();
void error_with_file_and_line PVPROTO((const char *file,
int line, const char *s, ...));
void error_with_decl PVPROTO((tree decl, const char *s, ...));
void error_for_asm PVPROTO((rtx insn, const char *s, ...));
void notice PVPROTO((const char *s, ...));
void error PVPROTO((const char *s, ...));
void fatal PVPROTO((const char *s, ...));
void warning_with_file_and_line PVPROTO((const char *file,
int line, const char *s, ...));
void warning_with_decl PVPROTO((tree decl, const char *s, ...));
void warning PVPROTO((const char *s, ...));
void pedwarn PVPROTO((const char *s, ...));
void pedwarn_with_decl PVPROTO((tree decl, const char *s, ...));
void pedwarn_with_file_and_line PVPROTO((const char *file,
int line, const char *s, ...));
void sorry PVPROTO((const char *s, ...));
static void set_target_switch PROTO((const char *)); static void set_target_switch PROTO((const char *));
static const char *decl_name PROTO((tree, int)); static const char *decl_name PROTO((tree, int));
static void vmessage PROTO((const char *, const char *, va_list)); static void vmessage PROTO((const char *, const char *, va_list));
...@@ -204,6 +173,7 @@ static void v_pedwarn_with_decl PROTO((tree, const char *, va_list)); ...@@ -204,6 +173,7 @@ static void v_pedwarn_with_decl PROTO((tree, const char *, va_list));
static void v_pedwarn_with_file_and_line PROTO((const char *, int, static void v_pedwarn_with_file_and_line PROTO((const char *, int,
const char *, va_list)); const char *, va_list));
static void vsorry PROTO((const char *, va_list)); static void vsorry PROTO((const char *, va_list));
extern void set_fatal_function PROTO((void (*)(const char *, va_list)));
static void float_signal PROTO((int)) ATTRIBUTE_NORETURN; static void float_signal PROTO((int)) ATTRIBUTE_NORETURN;
static void pipe_closed PROTO((int)) ATTRIBUTE_NORETURN; static void pipe_closed PROTO((int)) ATTRIBUTE_NORETURN;
#ifdef ASM_IDENTIFY_LANGUAGE #ifdef ASM_IDENTIFY_LANGUAGE
...@@ -216,6 +186,10 @@ static void dump_rtl PROTO((const char *, tree, void (*) (FILE *, rtx), rtx)); ...@@ -216,6 +186,10 @@ static void dump_rtl PROTO((const char *, tree, void (*) (FILE *, rtx), rtx));
static void clean_dump_file PROTO((const char *)); static void clean_dump_file PROTO((const char *));
static void compile_file PROTO((char *)); static void compile_file PROTO((char *));
static void display_help PROTO ((void)); static void display_help PROTO ((void));
static int check_lang_option PROTO ((const char *, const char *));
static void report_file_and_line PROTO ((const char *, int, int));
static void vnotice PROTO ((FILE *, const char *, va_list));
static void mark_file_stack PROTO ((void *));
static void print_version PROTO((FILE *, const char *)); static void print_version PROTO((FILE *, const char *));
static int print_single_switch PROTO((FILE *, int, int, const char *, static int print_single_switch PROTO((FILE *, int, int, const char *,
...@@ -232,7 +206,7 @@ void finish_graph_dump_file PROTO ((const char *, const char *)); ...@@ -232,7 +206,7 @@ void finish_graph_dump_file PROTO ((const char *, const char *));
/* Name of program invoked, sans directories. */ /* Name of program invoked, sans directories. */
char *progname; const char *progname;
/* Copy of arguments to main. */ /* Copy of arguments to main. */
int save_argc; int save_argc;
...@@ -1607,13 +1581,13 @@ report_error_function (file) ...@@ -1607,13 +1581,13 @@ report_error_function (file)
static void static void
vnotice (file, msgid, ap) vnotice (file, msgid, ap)
FILE *file; FILE *file;
char *msgid; const char *msgid;
va_list ap; va_list ap;
{ {
vfprintf (file, _(msgid), ap); vfprintf (file, _(msgid), ap);
} }
void static void
notice VPROTO((const char *msgid, ...)) notice VPROTO((const char *msgid, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
...@@ -1655,7 +1629,7 @@ fnotice VPROTO((FILE *file, const char *msgid, ...)) ...@@ -1655,7 +1629,7 @@ fnotice VPROTO((FILE *file, const char *msgid, ...))
static void static void
report_file_and_line (file, line, warn) report_file_and_line (file, line, warn)
char *file; const char *file;
int line; int line;
int warn; int warn;
{ {
...@@ -1943,7 +1917,7 @@ static void (*fatal_function) PROTO((const char *, va_list)); ...@@ -1943,7 +1917,7 @@ static void (*fatal_function) PROTO((const char *, va_list));
void void
set_fatal_function (f) set_fatal_function (f)
void (*f) PROTO((char *, va_list)); void (*f) PROTO((const char *, va_list));
{ {
fatal_function = f; fatal_function = f;
} }
...@@ -4665,13 +4639,13 @@ display_help () ...@@ -4665,13 +4639,13 @@ display_help ()
static int static int
check_lang_option (option, lang_option) check_lang_option (option, lang_option)
char * option; const char * option;
char * lang_option; const char * lang_option;
{ {
lang_independent_options * indep_options; lang_independent_options * indep_options;
int len; int len;
long k; long k;
char * space; const char * space;
/* Ignore NULL entries. */ /* Ignore NULL entries. */
if (option == NULL || lang_option == NULL) if (option == NULL || lang_option == NULL)
...@@ -4733,6 +4707,8 @@ check_lang_option (option, lang_option) ...@@ -4733,6 +4707,8 @@ check_lang_option (option, lang_option)
Exit code is 35 if can't open files, 34 if fatal error, Exit code is 35 if can't open files, 34 if fatal error,
33 if had nonfatal errors, else success. */ 33 if had nonfatal errors, else success. */
extern int main PROTO ((int, char **));
int int
main (argc, argv) main (argc, argv)
int argc; int argc;
...@@ -4911,7 +4887,7 @@ main (argc, argv) ...@@ -4911,7 +4887,7 @@ main (argc, argv)
if (!strcmp (argv[i], "--help")) if (!strcmp (argv[i], "--help"))
{ {
display_help (); display_help ();
exit (0); return (0);
} }
if (strings_processed != 0) if (strings_processed != 0)
...@@ -5357,7 +5333,7 @@ main (argc, argv) ...@@ -5357,7 +5333,7 @@ main (argc, argv)
else if (!strcmp (str, "-help")) else if (!strcmp (str, "-help"))
{ {
display_help (); display_help ();
exit (0); return (0);
} }
else else
error ("Invalid option `%s'", argv[i]); error ("Invalid option `%s'", argv[i]);
...@@ -5486,11 +5462,10 @@ main (argc, argv) ...@@ -5486,11 +5462,10 @@ main (argc, argv)
#endif /* ! OS2 && ! VMS && (! _WIN32 || CYGWIN) && ! __INTERIX */ #endif /* ! OS2 && ! VMS && (! _WIN32 || CYGWIN) && ! __INTERIX */
if (errorcount) if (errorcount)
exit (FATAL_EXIT_CODE); return (FATAL_EXIT_CODE);
if (sorrycount) if (sorrycount)
exit (FATAL_EXIT_CODE); return (FATAL_EXIT_CODE);
exit (SUCCESS_EXIT_CODE); return (SUCCESS_EXIT_CODE);
return 0;
} }
/* Decode -m switches. */ /* Decode -m switches. */
......
...@@ -130,4 +130,6 @@ extern void check_global_declarations PROTO ((union tree_node **, int)); ...@@ -130,4 +130,6 @@ extern void check_global_declarations PROTO ((union tree_node **, int));
extern int errorcount; extern int errorcount;
extern int warningcount; extern int warningcount;
extern int sorrycount; extern int sorrycount;
extern const char *progname;
#endif /* __GCC_TOPLEV_H */ #endif /* __GCC_TOPLEV_H */
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