OSDN Git Service

Warning fixes:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Oct 1998 15:25:25 +0000 (15:25 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Oct 1998 15:25:25 +0000 (15:25 +0000)
* Makefile.in (gencheck.o): Depend on gansidecl.h.
* c-common.c (print_char_table): Add missing initializers.
(scan_char_table): Likewise.
(time_char_table): Likewise.
* c-decl.c (c_decode_option): Mark parameter `argc' with
ATTRIBUTE_UNUSED.
(declare_parm_level): Mark parameter `definition_flag' with
ATTRIBUTE_UNUSED.
* c-lex.c (readescape): Use `(unsigned)1' in shift.
(yylex): Likewise.  Cast `sizeof' to an (int) when comparing
against one.
* calls.c (store_one_arg): Remove unused parameter `fndecl'.  All
callers changed.
(emit_call_1): Mark parameters `fndecl' and `funtype' with
ATTRIBUTE_UNUSED.
(expand_call): Cast result of MIN() to (unsigned int) when
comparing against an unsigned value.
* cccp.c (pcfinclude): Remove unused parameter `limit'.  All
callers changed.
(make_definition): Remove unused parameter `op'.  All callers
changed.
(create_definition): Cast REST_EXTENSION_LENGTH to (long) when
comparing against the result of pointer arithmetic.
* config/mips/mips.h (FUNCTION_ARG_BOUNDARY): Cast to (unsigned)
when comparing against one.
* dwarf2out.c (dwarf2out_frame_debug): Cast REGNO() and
  HARD_FRAME_POINTER_REGNUM to (unsigned) when comparing against
  one.
(output_die): Move variable `i' into the scope in which it is
used.  Change its type to `unsigned'.
(output_die): Cast the result of `strlen' to (int) when passing it
to ASM_OUTPUT_ASCII().
(output_pubnames): Likewise.
(output_line_info): Likewise.
* emit-rtl.c (global_rtl): Add missing initializers.
* explow.c (promote_mode): Mark parameter `for_call' with
ATTRIBUTE_UNUSED.
* expmed.c (expand_shift): Cast the result of GET_MODE_BITSIZE to
  `unsigned HOST_WIDE_INT' when comparing against one.
(synth_mult): Change type of variable `cost' to int.
(emit_store_flag): Use `(unsigned HOST_WIDE_INT) 1' in shift.
* expr.c (copy_blkmode_from_reg): Cast BITS_PER_WORD to (unsigned)
when comparing against one.
(get_inner_reference): Change variable `alignment' to unsigned.
(expand_expr): Cast the result of GET_MODE_ALIGNMENT to (unsigned
int) when comparing against one.
(expand_builtin_setjmp): Change type of variable `i' to size_t.
* fold-const.c (div_and_round_double): Cast BASE to
(HOST_WIDE_INT) when comparing against one.
* gencheck.c: Include gansidecl.h.
(main): Mark parameter `argv' with ATTRIBUTE_UNUSED.
* optabs.c (gen_cond_trap): Mark parameters `code', `op2' and
`tcode' with ATTRIBUTE_UNUSED.
* real.c (edivm): Cast constant value to (unsigned long) in
expression compared against an unsigned value.
* stmt.c (expand_return): Cast BITS_PER_WORD to (unsigned) when
comparing against one.
(expand_end_case): Cast CASE_VALUES_THRESHOLD to (unsigned int)
when comparing against one.
* stor-layout.c (mode_for_size): Cast MAX_FIXED_MODE_SIZE to
(unsigned int) when comparing against one.  Likewise for
GET_MODE_BITSIZE.
(smallest_mode_for_size): Likewise.
(save_storage_status): Mark parameter `p' with ATTRIBUTE_UNUSED.
(restore_storage_status): Likewise.
* toplev.c (debug_args): Add missing initializer.
(f_options): Spelling correction.  Add missing initializers.
(documented_lang_options): Likewise.
(debug_end_source_file): Mark parameter `lineno' with
ATTRIBUTE_UNUSED.
* tree.c (valid_machine_attribute): Mark parameters `attr_args',
`decl' and `type' with ATTRIBUTE_UNUSED.
* varasm.c (decode_reg_name): Cast `sizeof' expression to (int)
when comparing against one.
(assemble_variable): Mark parameter `top_level' with
ATTRIBUTE_UNUSED.
(assemble_external_libcall): Mark parameter `fun' with
ATTRIBUTE_UNUSED.
(output_constant_pool): Mark parameters `fnname' and `fndecl' with
ATTRIBUTE_UNUSED.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23054 138bc75d-0d04-0410-961f-82ee72b054a4

22 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/c-common.c
gcc/c-decl.c
gcc/c-lex.c
gcc/calls.c
gcc/cccp.c
gcc/config/mips/mips.h
gcc/dwarf2out.c
gcc/emit-rtl.c
gcc/explow.c
gcc/expmed.c
gcc/expr.c
gcc/fold-const.c
gcc/gencheck.c
gcc/optabs.c
gcc/real.c
gcc/stmt.c
gcc/stor-layout.c
gcc/toplev.c
gcc/tree.c
gcc/varasm.c

index db482bc..3f9ba28 100644 (file)
@@ -1,3 +1,106 @@
+Tue Oct 13 17:46:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * Makefile.in (gencheck.o): Depend on gansidecl.h.
+
+       * c-common.c (print_char_table): Add missing initializers.
+       (scan_char_table): Likewise.
+       (time_char_table): Likewise.
+
+       * c-decl.c (c_decode_option): Mark parameter `argc' with
+       ATTRIBUTE_UNUSED.
+       (declare_parm_level): Mark parameter `definition_flag' with
+       ATTRIBUTE_UNUSED.
+
+       * c-lex.c (readescape): Use `(unsigned)1' in shift.
+       (yylex): Likewise.  Cast `sizeof' to an (int) when comparing
+       against one.
+
+       * calls.c (store_one_arg): Remove unused parameter `fndecl'.  All
+       callers changed.
+       (emit_call_1): Mark parameters `fndecl' and `funtype' with
+       ATTRIBUTE_UNUSED.
+       (expand_call): Cast result of MIN() to (unsigned int) when
+       comparing against an unsigned value.
+
+       * cccp.c (pcfinclude): Remove unused parameter `limit'.  All
+       callers changed.
+       (make_definition): Remove unused parameter `op'.  All callers
+       changed.
+       (create_definition): Cast REST_EXTENSION_LENGTH to (long) when
+       comparing against the result of pointer arithmetic.
+
+       * config/mips/mips.h (FUNCTION_ARG_BOUNDARY): Cast to (unsigned)
+       when comparing against one.
+
+       * dwarf2out.c (dwarf2out_frame_debug): Cast REGNO() and
+       HARD_FRAME_POINTER_REGNUM to (unsigned) when comparing against
+       one.
+       (output_die): Move variable `i' into the scope in which it is
+       used.  Change its type to `unsigned'.
+       (output_die): Cast the result of `strlen' to (int) when passing it
+       to ASM_OUTPUT_ASCII().
+       (output_pubnames): Likewise.
+       (output_line_info): Likewise.
+
+       * emit-rtl.c (global_rtl): Add missing initializers.
+
+       * explow.c (promote_mode): Mark parameter `for_call' with
+       ATTRIBUTE_UNUSED.
+
+       * expmed.c (expand_shift): Cast the result of GET_MODE_BITSIZE to
+       `unsigned HOST_WIDE_INT' when comparing against one.
+       (synth_mult): Change type of variable `cost' to int.
+       (emit_store_flag): Use `(unsigned HOST_WIDE_INT) 1' in shift.
+
+       * expr.c (copy_blkmode_from_reg): Cast BITS_PER_WORD to (unsigned)
+       when comparing against one.
+       (get_inner_reference): Change variable `alignment' to unsigned.
+       (expand_expr): Cast the result of GET_MODE_ALIGNMENT to (unsigned
+       int) when comparing against one.
+       (expand_builtin_setjmp): Change type of variable `i' to size_t.
+
+       * fold-const.c (div_and_round_double): Cast BASE to
+       (HOST_WIDE_INT) when comparing against one.
+
+       * gencheck.c: Include gansidecl.h.
+       (main): Mark parameter `argv' with ATTRIBUTE_UNUSED.
+
+       * optabs.c (gen_cond_trap): Mark parameters `code', `op2' and
+       `tcode' with ATTRIBUTE_UNUSED.
+
+       * real.c (edivm): Cast constant value to (unsigned long) in
+       expression compared against an unsigned value.
+
+       * stmt.c (expand_return): Cast BITS_PER_WORD to (unsigned) when
+       comparing against one.
+       (expand_end_case): Cast CASE_VALUES_THRESHOLD to (unsigned int)
+       when comparing against one.
+
+       * stor-layout.c (mode_for_size): Cast MAX_FIXED_MODE_SIZE to
+       (unsigned int) when comparing against one.  Likewise for
+       GET_MODE_BITSIZE.
+       (smallest_mode_for_size): Likewise.
+       (save_storage_status): Mark parameter `p' with ATTRIBUTE_UNUSED.
+       (restore_storage_status): Likewise.
+       
+       * toplev.c (debug_args): Add missing initializer.
+       (f_options): Spelling correction.  Add missing initializers.
+       (documented_lang_options): Likewise.
+       (debug_end_source_file): Mark parameter `lineno' with
+       ATTRIBUTE_UNUSED.
+
+       * tree.c (valid_machine_attribute): Mark parameters `attr_args',
+       `decl' and `type' with ATTRIBUTE_UNUSED.
+
+       * varasm.c (decode_reg_name): Cast `sizeof' expression to (int)
+       when comparing against one.
+       (assemble_variable): Mark parameter `top_level' with
+       ATTRIBUTE_UNUSED.
+       (assemble_external_libcall): Mark parameter `fun' with
+       ATTRIBUTE_UNUSED.
+       (output_constant_pool): Mark parameters `fnname' and `fndecl' with
+       ATTRIBUTE_UNUSED.
+
 Tue Oct 13 12:51:04 1998  Nick Clifton  <nickc@cygnus.com>
 
        * config/v850/lib1funcs.asm (_udivsi3): Add .type declaration.
index 9875026..b39f69b 100644 (file)
@@ -1363,7 +1363,7 @@ gencheck : gencheck.o tree.def $(lang_tree_files) $(HOST_LIBDEPS)
        $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
         gencheck.o $(HOST_LIBS)
 
-gencheck.o : gencheck.c hconfig.h system.h
+gencheck.o : gencheck.c hconfig.h system.h gansidecl.h
        $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencheck.c
 
 dumpvers: dumpvers.c
index 3157e1d..a7b1ff1 100644 (file)
@@ -1137,7 +1137,7 @@ static format_char_info print_char_table[] = {
   { "S",       1,      T_W,    NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   "-wp"           },
   { "p",       1,      T_V,    NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   "-w"            },
   { "n",       1,      T_I,    NULL,   T_S,    T_L,    T_LL,   NULL,   NULL,   ""              },
-  { NULL }
+  { NULL,      0,      NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL            }
 };
 
 static format_char_info scan_char_table[] = {
@@ -1151,7 +1151,7 @@ static format_char_info scan_char_table[] = {
   { "S",       1,      T_W,    NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   "*a"    },
   { "p",       2,      T_V,    NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   "*"     },
   { "n",       1,      T_I,    T_C,    T_S,    T_L,    T_LL,   NULL,   NULL,   ""      },
-  { NULL }
+  { NULL,      0,      NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    }
 };
 
 /* Handle format characters recognized by glibc's strftime.c.
@@ -1176,7 +1176,7 @@ static format_char_info time_char_table[] = {
   { "p",               0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "#" },
   { "bh",              0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "^" },
   { "CY",              0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "-_0EOw" },
-  { NULL }
+  { NULL,              0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
 };
 
 typedef struct function_format_info
index 399acb0..1cf5b45 100644 (file)
@@ -601,7 +601,7 @@ int dollars_in_ident = DOLLARS_IN_IDENTIFIERS;
    
 int
 c_decode_option (argc, argv)
-     int argc;
+     int argc ATTRIBUTE_UNUSED;
      char **argv;
 {
   int strings_processed;
@@ -946,7 +946,7 @@ kept_level_p ()
 
 void
 declare_parm_level (definition_flag)
-     int definition_flag;
+     int definition_flag ATTRIBUTE_UNUSED;
 {
   current_binding_level->parm_flag = 1;
 }
index 6e56a3f..ec1386a 100644 (file)
@@ -950,7 +950,7 @@ readescape (ignore_ptr)
        ;
       else if ((count - 1) * 4 >= TYPE_PRECISION (integer_type_node)
               || (count > 1
-                  && ((1 << (TYPE_PRECISION (integer_type_node) - (count - 1) * 4))
+                  && (((unsigned)1 << (TYPE_PRECISION (integer_type_node) - (count - 1) * 4))
                       <= firstdig)))
        pedwarn ("hex escape out of range");
       return code;
@@ -1848,7 +1848,7 @@ yylex ()
                if (ignore)
                  goto tryagain;
                if (width < HOST_BITS_PER_INT
-                   && (unsigned) c >= (1 << width))
+                   && (unsigned) c >= ((unsigned)1 << width))
                  pedwarn ("escape sequence out of range for character");
 #ifdef MAP_CHARACTER
                if (ISPRINT (c))
@@ -2003,7 +2003,7 @@ yylex ()
                if (ignore)
                  goto skipnewline;
                if (width < HOST_BITS_PER_INT
-                   && (unsigned) c >= (1 << width))
+                   && (unsigned) c >= ((unsigned)1 << width))
                  pedwarn ("escape sequence out of range for character");
              }
            else if (c == '\n')
@@ -2063,7 +2063,7 @@ yylex ()
                for (byte = 0; byte < WCHAR_BYTES; ++byte)
                  {
                    int value;
-                   if (byte >= sizeof (c))
+                   if (byte >= (int) sizeof (c))
                      value = 0;
                    else
                      value = (c >> (byte * width)) & bytemask;
index c44617e..d46973a 100644 (file)
@@ -126,7 +126,7 @@ static void emit_call_1             PROTO((rtx, tree, tree, HOST_WIDE_INT,
                                       HOST_WIDE_INT, rtx, rtx,
                                       int, rtx, int));
 static void store_one_arg      PROTO ((struct arg_data *, rtx, int, int,
-                                       tree, int));
+                                       int));
 \f
 /* If WHICH is 1, return 1 if EXP contains a call to the built-in function
    `alloca'.
@@ -343,8 +343,8 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, struct_value_size,
              next_arg_reg, valreg, old_inhibit_defer_pop, call_fusage,
             is_const)
      rtx funexp;
-     tree fndecl;
-     tree funtype;
+     tree fndecl ATTRIBUTE_UNUSED;
+     tree funtype ATTRIBUTE_UNUSED;
      HOST_WIDE_INT stack_size;
      HOST_WIDE_INT struct_value_size;
      rtx next_arg_reg;
@@ -1765,7 +1765,7 @@ expand_call (exp, target, ignore)
   for (i = 0; i < num_actuals; i++)
     if (args[i].reg == 0 || args[i].pass_on_stack)
       store_one_arg (&args[i], argblock, may_be_alloca,
-                    args_size.var != 0, fndecl, reg_parm_stack_space);
+                    args_size.var != 0, reg_parm_stack_space);
 
   /* If we have a parm that is passed in registers but not in memory
      and whose alignment does not permit a direct copy into registers,
@@ -1777,7 +1777,7 @@ expand_call (exp, target, ignore)
       if (args[i].reg != 0 && ! args[i].pass_on_stack
        && args[i].mode == BLKmode
          && (TYPE_ALIGN (TREE_TYPE (args[i].tree_value))
-             < MIN (BIGGEST_ALIGNMENT, BITS_PER_WORD)))
+             < (unsigned int) MIN (BIGGEST_ALIGNMENT, BITS_PER_WORD)))
        {
          int bytes = int_size_in_bytes (TREE_TYPE (args[i].tree_value));
          int big_endian_correction = 0;
@@ -1835,7 +1835,7 @@ expand_call (exp, target, ignore)
     for (i = 0; i < num_actuals; i++)
       if (args[i].partial != 0 && ! args[i].pass_on_stack)
        store_one_arg (&args[i], argblock, may_be_alloca,
-                      args_size.var != 0, fndecl, reg_parm_stack_space);
+                      args_size.var != 0, reg_parm_stack_space);
 
 #ifndef PUSH_ARGS_REVERSED
 #ifdef STACK_BOUNDARY
@@ -3357,13 +3357,12 @@ target_for_arg (type, size, args_addr, offset)
    FNDECL is the declaration of the function we are calling.  */
 
 static void
-store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl,
+store_one_arg (arg, argblock, may_be_alloca, variable_size,
               reg_parm_stack_space)
      struct arg_data *arg;
      rtx argblock;
      int may_be_alloca;
      int variable_size;
-     tree fndecl;
      int reg_parm_stack_space;
 {
   register tree pval = arg->tree_value;
index b39675d..363afa4 100644 (file)
@@ -942,7 +942,7 @@ static void record_control_macro PROTO((struct include_file *, U_CHAR *));
 
 static char *check_precompiled PROTO((int, struct stat *, char *, char **));
 static int check_preconditions PROTO((char *));
-static void pcfinclude PROTO((U_CHAR *, U_CHAR *, U_CHAR *, FILE_BUF *));
+static void pcfinclude PROTO((U_CHAR *, U_CHAR *, FILE_BUF *));
 static void pcstring_used PROTO((HASHNODE *));
 static void write_output PROTO((void));
 static void pass_thru_directive PROTO((U_CHAR *, U_CHAR *, FILE_BUF *, struct directive *));
@@ -1024,7 +1024,7 @@ static void dump_arg_n PROTO((DEFINITION *, int, FILE *));
 static void initialize_char_syntax PROTO((void));
 static void initialize_builtins PROTO((FILE_BUF *, FILE_BUF *));
 
-static void make_definition PROTO((char *, FILE_BUF *));
+static void make_definition PROTO((char *));
 static void make_undef PROTO((char *, FILE_BUF *));
 
 static void make_assertion PROTO((char *, char *));
@@ -1828,7 +1828,7 @@ main (argc, argv)
            sprintf (versbuf, "__VMS_VER=%08ld", vms_version_value);
            if (debug_output)
              output_line_directive (fp, &outbuf, 0, same_file);
-           make_definition (versbuf, &outbuf);
+           make_definition (versbuf);
          }
       }
 #endif
@@ -1847,7 +1847,7 @@ main (argc, argv)
          *p++= 0;
        if (debug_output)
          output_line_directive (fp, &outbuf, 0, same_file);
-       make_definition (q, &outbuf);
+       make_definition (q);
        while (*p == ' ' || *p == '\t')
          p++;
       } else if (p[0] == '-' && p[1] == 'A') {
@@ -1912,7 +1912,7 @@ main (argc, argv)
     if (pend_defs[i]) {
       if (debug_output)
         output_line_directive (fp, &outbuf, 0, same_file);
-      make_definition (pend_defs[i], &outbuf);
+      make_definition (pend_defs[i]);
     }
     if (pend_assertions[i])
       make_assertion (pend_assertion_options[i], pend_assertions[i]);
@@ -4806,8 +4806,7 @@ get_filename:
     if (pcfbuf) {
       pcfname = xmalloc (strlen (pcftry) + 1);
       strcpy (pcfname, pcftry);
-      pcfinclude ((U_CHAR *) pcfbuf, (U_CHAR *) pcfbuflimit,
-                 (U_CHAR *) fname, op);
+      pcfinclude ((U_CHAR *) pcfbuf, (U_CHAR *) fname, op);
     }
     else
       finclude (f, inc, op, is_system_include (fname), searchptr);
@@ -5514,8 +5513,8 @@ check_preconditions (prec)
    in.  OP is the main output buffer.  */
 
 static void
-pcfinclude (buf, limit, name, op)
-     U_CHAR *buf, *limit, *name;
+pcfinclude (buf, name, op)
+     U_CHAR *buf, *name;
      FILE_BUF *op;
 {
   FILE_BUF tmpbuf;
@@ -5802,7 +5801,7 @@ create_definition (buf, limit, op)
       while (is_idchar[*bp]) {
        bp++;
        /* do we have a "special" rest-args extension here? */
-       if (limit - bp > REST_EXTENSION_LENGTH
+       if (limit - bp > (long) REST_EXTENSION_LENGTH
            && bcmp (rest_extension, bp, REST_EXTENSION_LENGTH) == 0) {
          if (pedantic && !instack[indepth].system_header_p)
            pedwarn ("ANSI C does not allow macro with variable arguments");
@@ -10185,9 +10184,8 @@ initialize_builtins (inp, outp)
  */
 
 static void
-make_definition (str, op)
+make_definition (str)
      char *str;
-     FILE_BUF *op;
 {
   FILE_BUF *ip;
   struct directive *kt;
index 72e77b0..ddbc3bd 100644 (file)
@@ -2470,7 +2470,7 @@ typedef struct mips_args {
 
 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE)                              \
   (((TYPE) != 0)                                                       \
-       ? ((TYPE_ALIGN(TYPE) <= PARM_BOUNDARY)                          \
+       ? ((TYPE_ALIGN(TYPE) <= (unsigned)PARM_BOUNDARY)                \
                ? PARM_BOUNDARY                                         \
                : TYPE_ALIGN(TYPE))                                     \
        : ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY)                  \
index 3314b9f..c1b22da 100644 (file)
@@ -1252,7 +1252,7 @@ dwarf2out_frame_debug (insn)
        {
          /* Setting FP from SP.  */
        case REG:
-         if (cfa_reg != REGNO (src))
+         if (cfa_reg != (unsigned) REGNO (src))
            abort ();
          if (REGNO (dest) != STACK_POINTER_REGNUM
              && !(frame_pointer_needed
@@ -1272,7 +1272,7 @@ dwarf2out_frame_debug (insn)
                  offset = INTVAL (XEXP (src, 1));
                  break;
                case REG:
-                 if (REGNO (XEXP (src, 1)) != cfa_temp_reg)
+                 if ((unsigned) REGNO (XEXP (src, 1)) != cfa_temp_reg)
                    abort ();
                  offset = cfa_temp_value;
                  break;
@@ -1283,7 +1283,7 @@ dwarf2out_frame_debug (insn)
              if (XEXP (src, 0) == hard_frame_pointer_rtx)
                {
                  /* Restoring SP from FP in the epilogue.  */
-                 if (cfa_reg != HARD_FRAME_POINTER_REGNUM)
+                 if (cfa_reg != (unsigned) HARD_FRAME_POINTER_REGNUM)
                    abort ();
                  cfa_reg = STACK_POINTER_REGNUM;
                }
@@ -1319,7 +1319,7 @@ dwarf2out_frame_debug (insn)
               else if (XEXP (src, 0) == hard_frame_pointer_rtx
                        && GET_CODE (XEXP (src, 1)) == CONST_INT)
                 {
-                 if (cfa_reg != HARD_FRAME_POINTER_REGNUM)
+                 if (cfa_reg != (unsigned) HARD_FRAME_POINTER_REGNUM)
                    abort ();
                   offset = INTVAL (XEXP (src, 1));
                   if (GET_CODE (src) == PLUS)
@@ -1336,7 +1336,7 @@ dwarf2out_frame_debug (insn)
                  || XEXP (src, 1) != stack_pointer_rtx)
                abort ();
              if (GET_CODE (XEXP (src, 0)) != REG
-                 || REGNO (XEXP (src, 0)) != cfa_temp_reg)
+                 || (unsigned) REGNO (XEXP (src, 0)) != cfa_temp_reg)
                abort ();
              if (cfa_reg != STACK_POINTER_REGNUM)
                abort ();
@@ -1352,8 +1352,8 @@ dwarf2out_frame_debug (insn)
 
        case IOR:
          if (GET_CODE (XEXP (src, 0)) != REG
-             || REGNO (XEXP (src, 0)) != cfa_temp_reg
-             || REGNO (dest) != cfa_temp_reg
+             || (unsigned) REGNO (XEXP (src, 0)) != cfa_temp_reg
+             || (unsigned) REGNO (dest) != cfa_temp_reg
              || GET_CODE (XEXP (src, 1)) != CONST_INT)
            abort ();
          cfa_temp_value |= INTVAL (XEXP (src, 1));
@@ -1396,14 +1396,14 @@ dwarf2out_frame_debug (insn)
          if (GET_CODE (src) == MINUS)
            offset = -offset;
 
-         if (cfa_store_reg != REGNO (XEXP (XEXP (dest, 0), 0)))
+         if (cfa_store_reg != (unsigned) REGNO (XEXP (XEXP (dest, 0), 0)))
            abort ();
          offset -= cfa_store_offset;
          break;
 
          /* Without an offset.  */
        case REG:
-         if (cfa_store_reg != REGNO (XEXP (dest, 0)))
+         if (cfa_store_reg != (unsigned) REGNO (XEXP (dest, 0)))
            abort();
          offset = -cfa_store_offset;
          break;
@@ -5199,7 +5199,6 @@ output_die (die)
   register unsigned long ref_offset;
   register unsigned long size;
   register dw_loc_descr_ref loc;
-  register int i;
 
   output_uleb128 (die->die_abbrev);
   if (flag_debug_asm)
@@ -5302,24 +5301,27 @@ output_die (die)
          break;
 
        case dw_val_class_float:
-         ASM_OUTPUT_DWARF_DATA1 (asm_out_file,
-                                 a->dw_attr_val.v.val_float.length * 4);
-         if (flag_debug_asm)
-           fprintf (asm_out_file, "\t%s %s",
-                    ASM_COMMENT_START, dwarf_attr_name (a->dw_attr));
-
-         fputc ('\n', asm_out_file);
-         for (i = 0; i < a->dw_attr_val.v.val_float.length; ++i)
-           {
-             ASM_OUTPUT_DWARF_DATA4 (asm_out_file,
-                                     a->dw_attr_val.v.val_float.array[i]);
-             if (flag_debug_asm)
-               fprintf (asm_out_file, "\t%s fp constant word %d",
-                        ASM_COMMENT_START, i);
+         {
+           register unsigned int i;
+           ASM_OUTPUT_DWARF_DATA1 (asm_out_file,
+                                   a->dw_attr_val.v.val_float.length * 4);
+           if (flag_debug_asm)
+             fprintf (asm_out_file, "\t%s %s",
+                      ASM_COMMENT_START, dwarf_attr_name (a->dw_attr));
+
+           fputc ('\n', asm_out_file);
+           for (i = 0; i < a->dw_attr_val.v.val_float.length; ++i)
+             {
+               ASM_OUTPUT_DWARF_DATA4 (asm_out_file,
+                                       a->dw_attr_val.v.val_float.array[i]);
+               if (flag_debug_asm)
+                 fprintf (asm_out_file, "\t%s fp constant word %u",
+                          ASM_COMMENT_START, i);
 
-             fputc ('\n', asm_out_file);
-           }
+               fputc ('\n', asm_out_file);
+             }
          break;
+         }
 
        case dw_val_class_flag:
          ASM_OUTPUT_DWARF_DATA1 (asm_out_file, a->dw_attr_val.v.val_flag);
@@ -5362,7 +5364,7 @@ output_die (die)
          else
            ASM_OUTPUT_ASCII (asm_out_file,
                              a->dw_attr_val.v.val_str,
-                             strlen (a->dw_attr_val.v.val_str) + 1);
+                             (int) strlen (a->dw_attr_val.v.val_str) + 1);
          break;
 
        default:
@@ -5514,7 +5516,8 @@ output_pubnames ()
        }
       else
        {
-         ASM_OUTPUT_ASCII (asm_out_file, pub->name, strlen (pub->name) + 1);
+         ASM_OUTPUT_ASCII (asm_out_file, pub->name,
+                           (int) strlen (pub->name) + 1);
        }
 
       fputc ('\n', asm_out_file);
@@ -5751,7 +5754,7 @@ output_line_info ()
        {
          ASM_OUTPUT_ASCII (asm_out_file,
                            file_table[ft_index],
-                           strlen (file_table[ft_index]) + 1);
+                           (int) strlen (file_table[ft_index]) + 1);
        }
 
       fputc ('\n', asm_out_file);
index d8f36af..e1209b7 100644 (file)
@@ -91,19 +91,27 @@ static int no_line_numbers;
    All of these except perhaps the floating-point CONST_DOUBLEs
    are unique; no other rtx-object will be equal to any of these.  */
 
+/* Avoid warnings by initializing the `fld' field.  Since its a union,
+   bypass problems with KNR compilers by only doing so when __GNUC__. */
+#ifdef __GNUC__
+#define FLDI , {{0}}
+#else
+#define FLDI
+#endif
+
 struct _global_rtl global_rtl =
 {
-  {PC, VOIDmode},                      /* pc_rtx */
-  {CC0, VOIDmode},                     /* cc0_rtx */
-  {REG},                               /* stack_pointer_rtx */
-  {REG},                               /* frame_pointer_rtx */
-  {REG},                               /* hard_frame_pointer_rtx */
-  {REG},                               /* arg_pointer_rtx */
-  {REG},                               /* virtual_incoming_args_rtx */
-  {REG},                               /* virtual_stack_vars_rtx */
-  {REG},                               /* virtual_stack_dynamic_rtx */
-  {REG},                               /* virtual_outgoing_args_rtx */
-  {REG},                               /* virtual_cfa_rtx */
+  {PC, VOIDmode, 0, 0, 0, 0, 0, 0, 0, 0 FLDI },  /* pc_rtx */
+  {CC0, VOIDmode, 0, 0, 0, 0, 0, 0, 0, 0 FLDI }, /* cc0_rtx */
+  {REG, VOIDmode, 0, 0, 0, 0, 0, 0, 0, 0 FLDI }, /* stack_pointer_rtx */
+  {REG, VOIDmode, 0, 0, 0, 0, 0, 0, 0, 0 FLDI }, /* frame_pointer_rtx */
+  {REG, VOIDmode, 0, 0, 0, 0, 0, 0, 0, 0 FLDI }, /* hard_frame_pointer_rtx */
+  {REG, VOIDmode, 0, 0, 0, 0, 0, 0, 0, 0 FLDI }, /* arg_pointer_rtx */
+  {REG, VOIDmode, 0, 0, 0, 0, 0, 0, 0, 0 FLDI }, /* virtual_incoming_args_rtx */
+  {REG, VOIDmode, 0, 0, 0, 0, 0, 0, 0, 0 FLDI }, /* virtual_stack_vars_rtx */
+  {REG, VOIDmode, 0, 0, 0, 0, 0, 0, 0, 0 FLDI }, /* virtual_stack_dynamic_rtx */
+  {REG, VOIDmode, 0, 0, 0, 0, 0, 0, 0, 0 FLDI }, /* virtual_outgoing_args_rtx */
+  {REG, VOIDmode, 0, 0, 0, 0, 0, 0, 0, 0 FLDI }, /* virtual_cfa_rtx */
 };
 
 /* We record floating-point CONST_DOUBLEs in each floating-point mode for
index 58d4ebd..95fb561 100644 (file)
@@ -736,7 +736,7 @@ promote_mode (type, mode, punsignedp, for_call)
      tree type;
      enum machine_mode mode;
      int *punsignedp;
-     int for_call;
+     int for_call ATTRIBUTE_UNUSED;
 {
   enum tree_code code = TREE_CODE (type);
   int unsignedp = *punsignedp;
index 9b285d0..bb22245 100644 (file)
@@ -1854,7 +1854,8 @@ expand_shift (code, mode, shifted, amount, target, unsignedp)
   if (SHIFT_COUNT_TRUNCATED)
     {
       if (GET_CODE (op1) == CONST_INT
-          && (unsigned HOST_WIDE_INT) INTVAL (op1) >= GET_MODE_BITSIZE (mode))
+          && ((unsigned HOST_WIDE_INT) INTVAL (op1) >=
+             (unsigned HOST_WIDE_INT) GET_MODE_BITSIZE (mode)))
         op1 = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (op1)
                       % GET_MODE_BITSIZE (mode));
       else if (GET_CODE (op1) == SUBREG
@@ -2029,7 +2030,7 @@ synth_mult (alg_out, t, cost_limit)
 {
   int m;
   struct algorithm *alg_in, *best_alg;
-  unsigned int cost;
+  int cost;
   unsigned HOST_WIDE_INT q;
 
   /* Indicate that no algorithm is yet found.  If no algorithm
@@ -4292,7 +4293,7 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep)
 
       else if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
               && ((STORE_FLAG_VALUE & GET_MODE_MASK (mode))
-                  == (HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1)))
+                  == (unsigned HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1)))
        ;
       else
        return 0;
index 5e7a231..9a42b43 100644 (file)
@@ -2101,7 +2101,7 @@ copy_blkmode_from_reg(tgtblk,srcreg,type)
 {
       int bytes = int_size_in_bytes (type);
       rtx src = NULL, dst = NULL;
-      int bitsize = MIN (TYPE_ALIGN (type), BITS_PER_WORD);
+      int bitsize = MIN (TYPE_ALIGN (type), (unsigned int) BITS_PER_WORD);
       int bitpos, xbitpos, big_endian_correction = 0;
       
       if (tgtblk == 0)
@@ -4709,7 +4709,7 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
   tree size_tree = 0;
   enum machine_mode mode = VOIDmode;
   tree offset = integer_zero_node;
-  int alignment = BIGGEST_ALIGNMENT;
+  unsigned int alignment = BIGGEST_ALIGNMENT;
 
   if (TREE_CODE (exp) == COMPONENT_REF)
     {
@@ -6462,7 +6462,7 @@ expand_expr (exp, target, tmode, modifier)
                    /* If the field isn't aligned enough to fetch as a memref,
                       fetch it as a bit field.  */
                    || (SLOW_UNALIGNED_ACCESS
-                       && ((TYPE_ALIGN (TREE_TYPE (tem)) < GET_MODE_ALIGNMENT (mode))
+                       && ((TYPE_ALIGN (TREE_TYPE (tem)) < (unsigned int) GET_MODE_ALIGNMENT (mode))
                            || (bitpos % GET_MODE_ALIGNMENT (mode) != 0))))))
          {
            enum machine_mode ext_mode = mode;
@@ -8422,7 +8422,7 @@ expand_builtin_setjmp (buf_addr, target, first_label, next_label)
   if (fixed_regs[ARG_POINTER_REGNUM])
     {
 #ifdef ELIMINABLE_REGS
-      int i;
+      size_t i;
       static struct elims {int from, to;} elim_regs[] = ELIMINABLE_REGS;
 
       for (i = 0; i < sizeof elim_regs / sizeof elim_regs[0]; i++)
index 0d04e91..c05c331 100644 (file)
@@ -529,7 +529,7 @@ div_and_round_double (code, uns,
   encode (den, lden, hden);
 
   /* Special code for when the divisor < BASE.  */
-  if (hden == 0 && lden < BASE)
+  if (hden == 0 && lden < (HOST_WIDE_INT) BASE)
     {
       /* hnum != 0 already checked.  */
       for (i = 4 - 1; i >= 0; i--)
index 03a4127..fdbe3ec 100644 (file)
@@ -20,6 +20,7 @@ Boston, MA 02111-1307, USA.  */
 
 #include "hconfig.h"
 #include "system.h"
+#include "gansidecl.h"
 
 #define DEFTREECODE(SYM, NAME, TYPE, LEN)   STRINGIFY(SYM),
 
@@ -36,7 +37,7 @@ void usage ()
 
 int main (argc, argv)
      int argc;
-     char *argv[];
+     char *argv[] ATTRIBUTE_UNUSED;
 {
   int i;
 
index 2a32169..f4095c8 100644 (file)
@@ -4451,8 +4451,8 @@ init_traps ()
 
 rtx
 gen_cond_trap (code, op1, op2, tcode)
-     enum rtx_code code;
-     rtx op1, op2, tcode;
+  enum rtx_code code ATTRIBUTE_UNUSED;
+  rtx op1, op2 ATTRIBUTE_UNUSED, tcode ATTRIBUTE_UNUSED;
 {
   enum machine_mode mode = GET_MODE (op1);
 
index 63badc4..7e05913 100644 (file)
@@ -2333,7 +2333,7 @@ edivm (den, num)
       tnum = (((unsigned EMULONG) num[M]) << 16) + num[M+1];
 
       /* Do not execute the divide instruction if it will overflow.  */
-      if ((tdenm * 0xffffL) < tnum)
+      if ((tdenm * (unsigned long)0xffff) < tnum)
        tquot = 0xffff;
       else
        tquot = tnum / tdenm;
index b28df90..f821d77 100644 (file)
@@ -2630,7 +2630,8 @@ expand_return (retval)
       int big_endian_correction = 0;
       int bytes = int_size_in_bytes (TREE_TYPE (retval_rhs));
       int n_regs = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
-      int bitsize = MIN (TYPE_ALIGN (TREE_TYPE (retval_rhs)),BITS_PER_WORD);
+      int bitsize = MIN (TYPE_ALIGN (TREE_TYPE (retval_rhs)),
+                        (unsigned int)BITS_PER_WORD);
       rtx *result_pseudos = (rtx *) alloca (sizeof (rtx) * n_regs);
       rtx result_reg, src = NULL_RTX, dst = NULL_RTX;
       rtx result_val = expand_expr (retval_rhs, NULL_RTX, VOIDmode, 0);
@@ -4899,7 +4900,7 @@ expand_end_case (orig_index)
 #endif /* CASE_VALUES_THRESHOLD */
 
       else if (TREE_INT_CST_HIGH (range) != 0
-              || count < CASE_VALUES_THRESHOLD
+              || count < (unsigned int) CASE_VALUES_THRESHOLD
               || ((unsigned HOST_WIDE_INT) (TREE_INT_CST_LOW (range))
                   > 10 * count)
 #ifndef ASM_OUTPUT_ADDR_DIFF_ELT
index a6bf053..a947447 100644 (file)
@@ -144,13 +144,13 @@ mode_for_size (size, class, limit)
 {
   register enum machine_mode mode;
 
-  if (limit && size > MAX_FIXED_MODE_SIZE)
+  if (limit && size > (unsigned int)(MAX_FIXED_MODE_SIZE))
     return BLKmode;
 
   /* Get the first mode which has this size, in the specified class.  */
   for (mode = GET_CLASS_NARROWEST_MODE (class); mode != VOIDmode;
        mode = GET_MODE_WIDER_MODE (mode))
-    if (GET_MODE_BITSIZE (mode) == size)
+    if ((unsigned int)GET_MODE_BITSIZE (mode) == size)
       return mode;
 
   return BLKmode;
@@ -170,7 +170,7 @@ smallest_mode_for_size (size, class)
      specified class.  */
   for (mode = GET_CLASS_NARROWEST_MODE (class); mode != VOIDmode;
        mode = GET_MODE_WIDER_MODE (mode))
-    if (GET_MODE_BITSIZE (mode) >= size)
+    if ((unsigned int)GET_MODE_BITSIZE (mode) >= size)
       return mode;
 
   abort ();
@@ -1382,7 +1382,7 @@ get_best_mode (bitsize, bitpos, align, largest_mode, volatilep)
 
 void
 save_storage_status (p)
-     struct function *p;
+     struct function *p ATTRIBUTE_UNUSED;
 {
 #if 0  /* Need not save, since always 0 and non0 (resp.) within a function.  */
   p->pending_sizes = pending_sizes;
@@ -1395,7 +1395,7 @@ save_storage_status (p)
 
 void
 restore_storage_status (p)
-     struct function *p;
+     struct function *p ATTRIBUTE_UNUSED;
 {
 #if 0
   pending_sizes = p->pending_sizes;
index 97ee2fa..8e777b1 100644 (file)
@@ -762,7 +762,7 @@ debug_args[] =
 #ifdef SDB_DEBUGGING_INFO
   { "gcoff", SDB_DEBUG, 0, "Generate COFF format debug output" },
 #endif
-  { 0, 0, 0 }
+  { 0, 0, 0, 0 }
 };
 
 typedef struct
@@ -896,8 +896,9 @@ lang_independent_options f_options[] =
   {"gnu-linker", &flag_gnu_linker, 1,
    "Output GNU ld formatted global initialisers"},
   {"regmove", &flag_regmove, 1,
-   "Enables a regoster move optimisation"},
-  {"optimize-register-move", &flag_regmove, 1},
+   "Enables a register move optimisation"},
+  {"optimize-register-move", &flag_regmove, 1,
+   "Do the full regmove optimization pass"},
   {"pack-struct", &flag_pack_struct, 1,
    "Pack structure members together without holes" },
   {"stack-check", &flag_stack_check, 1,
@@ -914,7 +915,8 @@ lang_independent_options f_options[] =
    "Generate code to check every memory access" },
   {"prefix-function-name", &flag_prefix_function_name, 1,
    "Add a prefix to all function names" },
-  {"dump-unnumbered", &flag_dump_unnumbered, 1},
+  {"dump-unnumbered", &flag_dump_unnumbered, 1,
+   "Suppress output of instruction numbers and line number notes in debugging dumps"},
   {"instrument-functions", &flag_instrument_function_entry_exit, 1,
    "Instrument function entry/exit with profiling calls"},
 };
@@ -981,9 +983,9 @@ documented_lang_options[] =
   { "-Wchar-subscripts", "Warn about subscripts whose type is 'char'"},
   { "-Wno-char-subscripts", "" },
   { "-Wcomment", "Warn if nested comments are detected" },
-  { "-Wno-comment", },
-  { "-Wcomments", },
-  { "-Wno-comments", },
+  { "-Wno-comment", "" },
+  { "-Wcomments", "Warn if nested comments are detected" },
+  { "-Wno-comments", "" },
   { "-Wconversion", "Warn about possibly confusing type conversions" },
   { "-Wno-conversion", "" },
   { "-Wformat", "Warn about printf format anomalies" },
@@ -5087,7 +5089,7 @@ debug_start_source_file (filename)
 
 void
 debug_end_source_file (lineno)
-     register unsigned lineno;
+     register unsigned lineno ATTRIBUTE_UNUSED;
 {
 #ifdef DBX_DEBUGGING_INFO
   if (write_symbols == DBX_DEBUG)
index e0e2484..35b83a4 100644 (file)
@@ -3332,9 +3332,10 @@ build_type_attribute_variant (ttype, attribute)
 
 int
 valid_machine_attribute (attr_name, attr_args, decl, type)
-     tree attr_name, attr_args;
-     tree decl;
-     tree type;
+  tree attr_name;
+  tree attr_args ATTRIBUTE_UNUSED;
+  tree decl ATTRIBUTE_UNUSED;
+  tree type ATTRIBUTE_UNUSED;
 {
   int valid = 0;
 #ifdef VALID_MACHINE_DECL_ATTRIBUTE
index d9e5261..e47a0cd 100644 (file)
@@ -595,7 +595,7 @@ decode_reg_name (asmspec)
        static struct { char *name; int number; } table[]
          = ADDITIONAL_REGISTER_NAMES;
 
-       for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
+       for (i = 0; i < (int)(sizeof (table) / sizeof (table[0])); i++)
          if (! strcmp (asmspec, table[i].name))
            return table[i].number;
       }
@@ -1134,7 +1134,7 @@ assemble_string (p, size)
 void
 assemble_variable (decl, top_level, at_end, dont_output_data)
      tree decl;
-     int top_level;
+     int top_level ATTRIBUTE_UNUSED;
      int at_end;
      int dont_output_data;
 {
@@ -1608,7 +1608,7 @@ assemble_external (decl)
 
 void
 assemble_external_libcall (fun)
-     rtx fun;
+     rtx fun ATTRIBUTE_UNUSED;
 {
 #ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
   /* Declare library function name external when first used, if nec.  */
@@ -3572,8 +3572,8 @@ get_pool_size ()
 
 void
 output_constant_pool (fnname, fndecl)
-     char *fnname;
-     tree fndecl;
+  char *fnname ATTRIBUTE_UNUSED;
+  tree fndecl ATTRIBUTE_UNUSED;
 {
   struct pool_constant *pool;
   rtx x;