top level:
authorZack Weinberg <zack@wolery.cumb.org>
Sat, 20 May 2000 19:45:36 +0000 (19:45 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Sat, 20 May 2000 19:45:36 +0000 (19:45 +0000)
* diagnostic.c: Eliminate implicit int.
* except.c, gcc.c: Add static prototypes.
* final.c (final_end_function): Mark file arg ATTRIBUTE_UNUSED.
* gensupport.c (process_rtx): Use XVEC to initialize vector
slot of 'split'.

* print-rtl.c: If DEBUG_REGISTER_NAMES, define static
debug_reg_names instead of static reg_names.  If not, define
global reg_names.
* regclass.c: Don't define global reg_names unless
DEBUG_REGISTER_NAMES is defined.

* reload1.c (order_regs_for_reload): Remove unused variable.
* varasm.c: Include output.h after defaults.h.  Define
eh_frame_section as function of no args, not of unspecified args.

* gcc.c: Constify argbuf; arguments to store_arg,
process_command, main; elements of struct command and struct
switchstr; local variables in execute, process_command, main.

cp:
* except.c: Add static prototypes.

From-SVN: r34054

12 files changed:
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/except.c
gcc/diagnostic.c
gcc/except.c
gcc/final.c
gcc/gcc.c
gcc/gensupport.c
gcc/print-rtl.c
gcc/regclass.c
gcc/reload1.c
gcc/varasm.c

index 9c7e055353e642c809002d1893eb5ee61f092615..6d2bc426d86c7bb157e21dabb6926e60f954e37c 100644 (file)
@@ -1,3 +1,25 @@
+2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
+
+       * diagnostic.c: Eliminate implicit int.
+       * except.c, gcc.c: Add static prototypes.
+       * final.c (final_end_function): Mark file arg ATTRIBUTE_UNUSED.
+       * gensupport.c (process_rtx): Use XVEC to initialize vector
+       slot of 'split'.
+
+       * print-rtl.c: If DEBUG_REGISTER_NAMES, define static 
+       debug_reg_names instead of static reg_names.  If not, define
+       global reg_names.
+       * regclass.c: Don't define global reg_names unless
+       DEBUG_REGISTER_NAMES is defined.
+
+       * reload1.c (order_regs_for_reload): Remove unused variable.
+       * varasm.c: Include output.h after defaults.h.  Define
+       eh_frame_section as function of no args, not of unspecified args.
+
+       * gcc.c: Constify argbuf; arguments to store_arg,
+       process_command, main; elements of struct command and struct
+       switchstr; local variables in execute, process_command, main.
+
 2000-05-20  Bruce Korb  <bkorb@gnu.org>
 
        * fixinc/inclhack.def:  more applications of c_fix=format + tests
index 01d9e2e0bfcdf427297cb994bf8a07462fb63787..d2a84fb3a0517d621f14c5f00587e7add169db75 100644 (file)
@@ -1,3 +1,7 @@
+2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
+
+       * except.c: Add static prototypes.
+
 2000-05-20  H.J. Lu  <hjl@gnu.org>
 
        * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
index ce8535a86229b948f516e3319c89c779df45ad50..91f75c257feb53e412bda26bca51fdcf1ceebd3d 100644 (file)
@@ -54,6 +54,8 @@ static tree build_eh_type_type_ref PARAMS ((tree));
 static tree build_terminate_handler PARAMS ((void));
 static tree alloc_eh_object PARAMS ((tree));
 static int complete_ptr_ref_or_void_ptr_p PARAMS ((tree, tree));
+static int can_convert_eh PARAMS ((tree, tree));
+static void check_handlers_1 PARAMS ((tree, tree));
 static void initialize_handler_parm PARAMS ((tree));
 static tree expand_throw PARAMS ((tree));
 static int decl_is_java_type PARAMS ((tree decl, int err));
index 5c498c9b599e3c72f81be2814eab6faf54bbdcef..f559d68618921ddf200727b4e6303540653a2f72 100644 (file)
@@ -112,7 +112,7 @@ static int output_maximum_width = 0;
 
 /* Used to control every diagnostic message formatting.  Front-ends should
    call set_message_prefixing_rule to set up their politics.  */
-static current_prefixing_rule = DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE;
+static int current_prefixing_rule = DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE;
 \f
 /* Predicate. Return 1 if we're in automatic line wrapping mode.  */
 
index 2926b5a295b5da55ee19dbf6e1f953dad933d2b0..00816ef12825a57380822c6d906b9d3647180b4f 100644 (file)
@@ -470,6 +470,7 @@ static void set_insn_eh_region      PARAMS ((rtx *, int));
 #ifdef DONT_USE_BUILTIN_SETJMP
 static void jumpif_rtx         PARAMS ((rtx, rtx));
 #endif
+static void find_exception_handler_labels_1 PARAMS ((rtx));
 static void mark_eh_node        PARAMS ((struct eh_node *));
 static void mark_eh_stack       PARAMS ((struct eh_stack *));
 static void mark_eh_queue       PARAMS ((struct eh_queue *));
@@ -483,7 +484,6 @@ static int find_func_region PARAMS ((int));
 static int find_func_region_from_symbol PARAMS ((rtx));
 static void clear_function_eh_region PARAMS ((void));
 static void process_nestinfo   PARAMS ((int, eh_nesting_info *, int *));
-
 rtx expand_builtin_return_addr PARAMS ((enum built_in_function, int, rtx));
 static void emit_cleanup_handler PARAMS ((struct eh_entry *));
 static int eh_region_from_symbol PARAMS ((rtx));
index 1aedfa388448c5871234dc47e1b5509ed6baf164..e24471ce0dfb91e2969eba82990247a47ca9afdd 100644 (file)
@@ -1779,7 +1779,7 @@ profile_function (file)
 void
 final_end_function (first, file, optimize)
      rtx first ATTRIBUTE_UNUSED;
-     FILE *file;
+     FILE *file ATTRIBUTE_UNUSED;
      int optimize ATTRIBUTE_UNUSED;
 {
   app_disable ();
index 334e72b7e1dba1604700930d2ea53e8424249782..a8946a36b7dd63b0bdbbbb332ef0a8c6cd049778 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -199,6 +199,8 @@ static char **split_directories     PARAMS ((const char *, int *));
 static void free_split_directories PARAMS ((char **));
 static char *make_relative_prefix PARAMS ((const char *, const char *, const char *));
 #endif /* VMS */
+static void store_arg          PARAMS ((const char *, int, int));
+static char *load_specs                PARAMS ((const char *));
 static void read_specs         PARAMS ((const char *, int));
 static void set_spec           PARAMS ((const char *, const char *));
 static struct compiler *lookup_compiler PARAMS ((const char *, size_t, const char *));
@@ -208,6 +210,7 @@ static int access_check             PARAMS ((const char *, int));
 static char *find_a_file       PARAMS ((struct path_prefix *, const char *, int));
 static void add_prefix         PARAMS ((struct path_prefix *, const char *,
                                         const char *, int, int, int *));
+static void translate_options  PARAMS ((int *, const char ***));
 static char *skip_whitespace   PARAMS ((char *));
 static void record_temp_file   PARAMS ((const char *, int, int));
 static void delete_if_ordinary PARAMS ((const char *));
@@ -239,7 +242,7 @@ static void display_help    PARAMS ((void));
 static void add_preprocessor_option    PARAMS ((const char *, int));
 static void add_assembler_option       PARAMS ((const char *, int));
 static void add_linker_option          PARAMS ((const char *, int));
-static void process_command            PARAMS ((int, char **));
+static void process_command            PARAMS ((int, const char **));
 static int execute                     PARAMS ((void));
 static void unused_prefix_warnings     PARAMS ((struct path_prefix *));
 static void clear_args                 PARAMS ((void));
@@ -1287,7 +1290,7 @@ set_spec (name, spec)
 
 /* Vector of pointers to arguments in the current line of specifications.  */
 
-static char **argbuf;
+static const char **argbuf;
 
 /* Number of elements allocated in argbuf.  */
 
@@ -1437,12 +1440,13 @@ clear_args ()
 
 static void
 store_arg (arg, delete_always, delete_failure)
-     char *arg;
+     const char *arg;
      int delete_always, delete_failure;
 {
   if (argbuf_index + 1 == argbuf_length)
     argbuf
-      = (char **) xrealloc (argbuf, (argbuf_length *= 2) * sizeof (char *));
+      = (const char **) xrealloc (argbuf,
+                                 (argbuf_length *= 2) * sizeof (const char *));
 
   argbuf[argbuf_index++] = arg;
   argbuf[argbuf_index] = 0;
@@ -2504,7 +2508,7 @@ execute ()
   struct command
     {
       const char *prog;                /* program name.  */
-      char **argv;             /* vector of args.  */
+      const char **argv;       /* vector of args.  */
       int pid;                 /* pid of process for this command.  */
     };
 
@@ -2558,7 +2562,7 @@ execute ()
       /* Print each piped command as a separate line.  */
       for (i = 0; i < n_commands ; i++)
        {
-         char **j;
+         const char **j;
 
          for (j = commands[i].argv; *j; j++)
            fprintf (stderr, " %s", *j);
@@ -2587,7 +2591,7 @@ execute ()
   for (i = 0; i < n_commands; i++)
     {
       char *errmsg_fmt, *errmsg_arg;
-      char *string = commands[i].argv[0];
+      const char *string = commands[i].argv[0];
 
       commands[i].pid = pexecute (string, commands[i].argv,
                                  programname, temp_filename,
@@ -2602,7 +2606,7 @@ execute ()
        pfatal_pexecute (errmsg_fmt, errmsg_arg);
 
       if (string != commands[i].prog)
-       free (string);
+       free ((PTR) string);
     }
 
   execution_count++;
@@ -2703,7 +2707,7 @@ execute ()
 struct switchstr
 {
   const char *part1;
-  char **args;
+  const char **args;
   int live_cond;
   int validated;
 };
@@ -2909,12 +2913,12 @@ add_linker_option (option, len)
 static void
 process_command (argc, argv)
      int argc;
-     char **argv;
+     const char **argv;
 {
   register int i;
   const char *temp;
   char *temp1;
-  char *spec_lang = 0;
+  const char *spec_lang = 0;
   int last_language_n_infiles;
   int have_c = 0;
   int have_o = 0;
@@ -3229,7 +3233,7 @@ process_command (argc, argv)
        report_times = 1;
       else if (argv[i][0] == '-' && argv[i][1] != 0)
        {
-         register char *p = &argv[i][1];
+         register const char *p = &argv[i][1];
          register int c = *p;
 
          switch (c)
@@ -3248,7 +3252,7 @@ process_command (argc, argv)
 
            case 'B':
              {
-               char *value;
+               const char *value;
                if (p[1] == 0 && i + 1 == argc)
                  fatal ("argument to `-B' is missing");
                if (p[1] == 0)
@@ -3586,8 +3590,8 @@ process_command (argc, argv)
        }
       else if (argv[i][0] == '-' && argv[i][1] != 0)
        {
-         register char *p = &argv[i][1];
-         register int c = *p;
+         const char *p = &argv[i][1];
+         int c = *p;
 
          if (c == 'x')
            {
@@ -3622,7 +3626,7 @@ process_command (argc, argv)
              if (i + n_args >= argc)
                fatal ("argument to `-%s' is missing", p);
              switches[n_switches].args
-               = (char **) xmalloc ((n_args + 1) * sizeof (char *));
+               = (const char **) xmalloc ((n_args + 1) * sizeof(const char *));
              while (j < n_args)
                switches[n_switches].args[j++] = argv[++i];
              /* Null-terminate the vector.  */
@@ -3633,13 +3637,15 @@ process_command (argc, argv)
              /* On some systems, ld cannot handle some options without
                 a space.  So split the option from its argument.  */
              char *part1 = (char *) xmalloc (2);
+             char *tmp;
              part1[0] = c;
              part1[1] = '\0';
              
              switches[n_switches].part1 = part1;
-             switches[n_switches].args = (char **) xmalloc (2 * sizeof (char *));
-             switches[n_switches].args[0] = xmalloc (strlen (p));
-             strcpy (switches[n_switches].args[0], &p[1]);
+             switches[n_switches].args
+               = (const char **) xmalloc (2 * sizeof (const char *));
+             switches[n_switches].args[0] = tmp = xmalloc (strlen (p));
+             strcpy (tmp, &p[1]);
              switches[n_switches].args[1] = 0;
            }
          else
@@ -4982,7 +4988,7 @@ give_switch (switchnum, omit_first_word, include_blanks)
 
   if (switches[switchnum].args != 0)
     {
-      char **p;
+      const char **p;
       for (p = switches[switchnum].args; *p; p++)
        {
          if (include_blanks)
@@ -5124,12 +5130,12 @@ fatal_error (signum)
   kill (getpid (), signum);
 }
 
-extern int main PARAMS ((int, char **));
+extern int main PARAMS ((int, const char **));
 
 int
 main (argc, argv)
      int argc;
-     char **argv;
+     const char **argv;
 {
   register size_t i;
   size_t j;
@@ -5165,7 +5171,7 @@ main (argc, argv)
 #endif
 
   argbuf_length = 10;
-  argbuf = (char **) xmalloc (argbuf_length * sizeof (char *));
+  argbuf = (const char **) xmalloc (argbuf_length * sizeof (const char *));
 
   obstack_init (&obstack);
 
@@ -5250,7 +5256,7 @@ main (argc, argv)
     first_time = TRUE;
     for (i = 0; (int)i < n_switches; i++)
       {
-       char **args;
+       const char **args;
        const char *p, *q;
        if (!first_time)
          obstack_grow (&collect_obstack, " ", 1);
index 120614bcdfc574bd630668b89ecf126f4c5c34e6..b475523f47201b3cde4fd9d145070ac21743c380 100644 (file)
@@ -180,7 +180,7 @@ process_rtx (desc, lineno)
        split = rtx_alloc (DEFINE_SPLIT);
 
        i = XVECLEN (desc, 1);
-       XEXP (split, 0) = rtvec_alloc (i);
+       XVEC (split, 0) = rtvec_alloc (i);
        while (--i >= 0)
          {
            XVECEXP (split, 0, i) = copy_rtx (XVECEXP (desc, 1, i));
index 544e54408569e67373a91751c1a4b826b2cf4cdc..e52a41065bbc55f890363b1fe16c4b72bdffe057 100644 (file)
@@ -39,9 +39,10 @@ Boston, MA 02111-1307, USA.  */
 /* Array containing all of the register names */
 
 #ifdef DEBUG_REGISTER_NAMES
-static const char * const reg_names[] = DEBUG_REGISTER_NAMES;
+static const char * const debug_reg_names[] = DEBUG_REGISTER_NAMES;
+#define reg_names debug_reg_names
 #else
-static const char * const reg_names[] = REGISTER_NAMES;
+const char * const reg_names[] = REGISTER_NAMES;
 #endif
 
 static FILE *outfile;
index f4ed192f4f520b225a33c666da31d0a9b02aaff7..1ffbb3318ff177464a1399442dfe56b0d535fb5a 100644 (file)
@@ -160,9 +160,12 @@ enum reg_class reg_class_subunion[N_REG_CLASSES][N_REG_CLASSES];
 
 enum reg_class reg_class_superunion[N_REG_CLASSES][N_REG_CLASSES];
 
-/* Array containing all of the register names */
+/* Array containing all of the register names.  Unless
+   DEBUG_REGISTER_NAMES is defined, use the copy in print-rtl.c.  */
 
+#ifdef DEBUG_REGISTER_NAMES
 const char * const reg_names[] = REGISTER_NAMES;
+#endif
 
 /* For each hard register, the widest mode object that it can contain.
    This will be a MODE_INT mode if the register can hold integers.  Otherwise
index 3ff2b4555fc4a7687c53cb4835332e4bed43c3ec..e7da78b8a03167ffcf479c0699b076d468862d43 100644 (file)
@@ -1518,7 +1518,7 @@ static void
 order_regs_for_reload (chain)
      struct insn_chain *chain;
 {
-  register int i, j;
+  int i;
   HARD_REG_SET used_by_pseudos;
   HARD_REG_SET used_by_pseudos2;
 
@@ -1541,14 +1541,14 @@ order_regs_for_reload (chain)
   CLEAR_REG_SET (&pseudos_counted);
 
   EXECUTE_IF_SET_IN_REG_SET
-    (&chain->live_throughout, FIRST_PSEUDO_REGISTER, j,
+    (&chain->live_throughout, FIRST_PSEUDO_REGISTER, i,
      {
-       count_pseudo (j);
+       count_pseudo (i);
      });
   EXECUTE_IF_SET_IN_REG_SET
-    (&chain->dead_or_set, FIRST_PSEUDO_REGISTER, j,
+    (&chain->dead_or_set, FIRST_PSEUDO_REGISTER, i,
      {
-       count_pseudo (j);
+       count_pseudo (i);
      });
   CLEAR_REG_SET (&pseudos_counted);
 }
index b92bf3c8156a92b12705343437f48745348ae42d..85755b71d3511e5ee04ea7bdb6525ae207b0199c 100644 (file)
@@ -35,10 +35,10 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "function.h"
 #include "expr.h"
-#include "output.h"
 #include "hard-reg-set.h"
 #include "regs.h"
 #include "defaults.h"
+#include "output.h"
 #include "real.h"
 #include "toplev.h"
 #include "dbxout.h"
@@ -427,7 +427,7 @@ asm_output_aligned_bss (file, decl, name, size, align)
 
 #ifdef EH_FRAME_SECTION_ASM_OP
 void
-eh_frame_section ()
+eh_frame_section (void)
 {
   if (in_section != in_eh_frame)
     {