summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-15 14:04:10 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-15 14:04:10 +0000
commit9ea8343030b2c1643c046e56a4212b3ba903134c (patch)
treef904b504d7b0e6016aba69dc8b456c718e0c587c
parent6a7488afb8f10aff65fddfa4b5e146634d7351ae (diff)
downloadgcc-9ea8343030b2c1643c046e56a4212b3ba903134c.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29433 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog24
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/typeck2.c1
-rw-r--r--gcc/print-rtl.c4
-rw-r--r--gcc/rtl.h2
-rw-r--r--gcc/toplev.c67
-rw-r--r--gcc/toplev.h2
7 files changed, 53 insertions, 51 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8676979a837..bb9f6049526 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,27 @@
+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>
* aclocal.m4 (AC_GCC_C_LONG_DOUBLE): New macro.
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f6fbcd65b25..e6cdab77be6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+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>
* typeck.c (expr_sizeof): Reinstall and augment OFFSET_REF
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 1374c79106b..4b37e48976e 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -253,7 +253,6 @@ ack VPROTO ((const char *msg, ...))
const char *msg;
#endif
va_list ap;
- extern char * progname;
VA_START (ap, msg);
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 862999a8c75..75a52ee9900 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -52,10 +52,6 @@ static int sawclose = 0;
static int indent;
-/* Names for patterns. */
-
-extern const char *get_insn_name PROTO ((int));
-
static void print_rtx PROTO ((rtx));
/* Nonzero means suppress output of instruction numbers and line number
diff --git a/gcc/rtl.h b/gcc/rtl.h
index be81bebe6db..5a03a9c8bfd 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -997,6 +997,7 @@ extern rtx make_safe_from PROTO((rtx, rtx));
extern rtx convert_memory_address PROTO((enum machine_mode, rtx));
extern rtx memory_address PROTO((enum machine_mode, rtx));
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_anywhere PROTO((void));
extern void start_sequence PROTO((void));
@@ -1530,6 +1531,7 @@ extern void allocate_bb_life_data PROTO ((void));
extern void allocate_reg_life_data PROTO ((void));
extern void recompute_reg_usage PROTO ((rtx, int));
#ifdef BUFSIZ
+extern void print_rtl_with_bb PROTO ((FILE *, rtx));
extern void dump_flow_info PROTO ((FILE *));
#endif
extern void free_bb_mem PROTO ((void));
diff --git a/gcc/toplev.c b/gcc/toplev.c
index a9e3e6070fd..e14c20a7318 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -149,38 +149,7 @@ extern char *version_string;
extern int size_directive_output;
extern tree last_assemble_variable_decl;
-extern void init_decl_processing ();
-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 notice PVPROTO((const char *s, ...)) ATTRIBUTE_PRINTF_1;
static void set_target_switch PROTO((const char *));
static const char *decl_name PROTO((tree, int));
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));
static void v_pedwarn_with_file_and_line PROTO((const char *, int,
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 pipe_closed PROTO((int)) ATTRIBUTE_NORETURN;
#ifdef ASM_IDENTIFY_LANGUAGE
@@ -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 compile_file PROTO((char *));
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 int print_single_switch PROTO((FILE *, int, int, const char *,
@@ -232,7 +206,7 @@ void finish_graph_dump_file PROTO ((const char *, const char *));
/* Name of program invoked, sans directories. */
-char *progname;
+const char *progname;
/* Copy of arguments to main. */
int save_argc;
@@ -1607,13 +1581,13 @@ report_error_function (file)
static void
vnotice (file, msgid, ap)
FILE *file;
- char *msgid;
+ const char *msgid;
va_list ap;
{
vfprintf (file, _(msgid), ap);
}
-void
+static void
notice VPROTO((const char *msgid, ...))
{
#ifndef ANSI_PROTOTYPES
@@ -1655,7 +1629,7 @@ fnotice VPROTO((FILE *file, const char *msgid, ...))
static void
report_file_and_line (file, line, warn)
- char *file;
+ const char *file;
int line;
int warn;
{
@@ -1943,7 +1917,7 @@ static void (*fatal_function) PROTO((const char *, va_list));
void
set_fatal_function (f)
- void (*f) PROTO((char *, va_list));
+ void (*f) PROTO((const char *, va_list));
{
fatal_function = f;
}
@@ -4665,13 +4639,13 @@ display_help ()
static int
check_lang_option (option, lang_option)
- char * option;
- char * lang_option;
+ const char * option;
+ const char * lang_option;
{
lang_independent_options * indep_options;
int len;
long k;
- char * space;
+ const char * space;
/* Ignore NULL entries. */
if (option == NULL || lang_option == NULL)
@@ -4733,6 +4707,8 @@ check_lang_option (option, lang_option)
Exit code is 35 if can't open files, 34 if fatal error,
33 if had nonfatal errors, else success. */
+extern int main PROTO ((int, char **));
+
int
main (argc, argv)
int argc;
@@ -4911,7 +4887,7 @@ main (argc, argv)
if (!strcmp (argv[i], "--help"))
{
display_help ();
- exit (0);
+ return (0);
}
if (strings_processed != 0)
@@ -5357,7 +5333,7 @@ main (argc, argv)
else if (!strcmp (str, "-help"))
{
display_help ();
- exit (0);
+ return (0);
}
else
error ("Invalid option `%s'", argv[i]);
@@ -5486,11 +5462,10 @@ main (argc, argv)
#endif /* ! OS2 && ! VMS && (! _WIN32 || CYGWIN) && ! __INTERIX */
if (errorcount)
- exit (FATAL_EXIT_CODE);
+ return (FATAL_EXIT_CODE);
if (sorrycount)
- exit (FATAL_EXIT_CODE);
- exit (SUCCESS_EXIT_CODE);
- return 0;
+ return (FATAL_EXIT_CODE);
+ return (SUCCESS_EXIT_CODE);
}
/* Decode -m switches. */
diff --git a/gcc/toplev.h b/gcc/toplev.h
index 30080980df6..508cd9d15ec 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -130,4 +130,6 @@ extern void check_global_declarations PROTO ((union tree_node **, int));
extern int errorcount;
extern int warningcount;
extern int sorrycount;
+
+extern const char *progname;
#endif /* __GCC_TOPLEV_H */