rtl.h (get_insn_name, [...]): Add prototypes.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 15 Sep 1999 14:04:10 +0000 (14:04 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 15 Sep 1999 14:04:10 +0000 (14:04 +0000)
* 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

gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/typeck2.c
gcc/print-rtl.c
gcc/rtl.h
gcc/toplev.c
gcc/toplev.h

index 8676979a837baff9e8d12191b9ac72dbf2c1e301..bb9f604952693736e9f28668fcac9b92c42ac923 100644 (file)
@@ -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.
index f6fbcd65b2505ec79026c40b4c87cbc6a266b221..e6cdab77be6de6e9a8931dd8d032d25f415df685 100644 (file)
@@ -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
index 1374c79106b7443eb211ec1c1374f8b3b24495f8..4b37e48976e699c7d981784b4995cf4900c2d040 100644 (file)
@@ -253,7 +253,6 @@ ack VPROTO ((const char *msg, ...))
   const char *msg;
 #endif
   va_list ap;
-  extern char * progname;
   
   VA_START (ap, msg);
 
index 862999a8c75aa9c5a789897f4e3e7a3fbfce7fc6..75a52ee99000a8d6221da8dc18120d3259789fe6 100644 (file)
@@ -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
index be81bebe6dbb9a1455ea1d32e51b88a4d61844eb..5a03a9c8bfde5626711a0357a8862a1e1e583a76 100644 (file)
--- 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));
index a9e3e6070fd475c1aaad9d0e07e766ec8418d3dd..e14c20a731884a029a5d2c2c4e391c27ea030dcf 100644 (file)
@@ -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);
 }
 \f
 /* Decode -m switches.  */
index 30080980df696b48d83ad4108ce4e166e83a9254..508cd9d15eca6e83480412b3b092746e277a2aad 100644 (file)
@@ -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 */