Warning fixes:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sat, 17 Oct 1998 20:26:29 +0000 (20:26 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sat, 17 Oct 1998 20:26:29 +0000 (20:26 +0000)
        * Makefile.in (flow.o): Depend on recog.h.
        * cpplib.h (directive_table): Add missing initializiers.
        (finclude): Change type of variable `bsize' to size_t.
        * cse.c (rtx_cost): Mark parameter `outer_code' with ATTRIBUTE_UNUSED.
        * dwarfout.h (dwarfout_label): Wrap prototype in macro RTX_CODE.
        * fix-header.c (lookup_std_proto): Cast the result of `strlen' to
        `int' when comparing against one.
        (cpp_file_line_for_message): Mark parameter `pfile' with
        ATTRIBUTE_UNUSED.
        (cpp_fatal): Mark parameter `pfile' with ATTRIBUTE_UNUSED.
        * flow.c: Include recog.h.
        (sbitmap_copy): Cast arguments 1 & 2 of `bcopy' to (PTR).
        * function.c (thread_prologue_and_epilogue_insns): Mark parameter
        `f' with ATTRIBUTE_UNUSED.
        (reposition_prologue_and_epilogue_notes): Likewise.
        * genopinit.c (gen_insn): Cast argument of ctype functions to
        `unsigned char'.
        * haifa-sched.c: Include recog.h.
        (blockage_range): Cast result of UNIT_BLOCKED macro to (int) when
        comparing against one.
        * libgcc2.a (__throw): Revert ATTRIBUTE_UNUSED change for now.
        * mips-tfile.c (parse_end): Cast the argument of ctype function to
        `unsigned char'.
        (parse_ent): Likewise.
        (parse_input): Likewise.
        * optabs.c (init_libfuncs): Likewise.
        * protoize.c (find_rightmost_formals_list): Likewise.
        * recog.h (const_double_operand): Fix typo in prototype.
        * tlink.c (scan_linker_output): Cast the argument of ctype
        function to `unsigned char'.
        * toplev.c (check_lang_option): Cast the result of `strlen' to
        `int' when comparing against one.

From-SVN: r23155

17 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/cpplib.c
gcc/cse.c
gcc/dwarfout.h
gcc/fix-header.c
gcc/flow.c
gcc/function.c
gcc/genopinit.c
gcc/haifa-sched.c
gcc/libgcc2.c
gcc/mips-tfile.c
gcc/optabs.c
gcc/protoize.c
gcc/recog.h
gcc/tlink.c
gcc/toplev.c

index 3f75ab89b5b22e6883a3866097d8f346af5b7610..62a23cf21b399e7ada86b503ec012f171b051f57 100644 (file)
@@ -1,3 +1,53 @@
+Sat Oct 17 23:18:08 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * Makefile.in (flow.o): Depend on recog.h.
+
+       * cpplib.h (directive_table): Add missing initializiers.
+       (finclude): Change type of variable `bsize' to size_t.
+       
+       * cse.c (rtx_cost): Mark parameter `outer_code' with ATTRIBUTE_UNUSED.
+
+       * dwarfout.h (dwarfout_label): Wrap prototype in macro RTX_CODE.
+
+       * fix-header.c (lookup_std_proto): Cast the result of `strlen' to
+       `int' when comparing against one.
+       (cpp_file_line_for_message): Mark parameter `pfile' with
+       ATTRIBUTE_UNUSED.
+       (cpp_fatal): Mark parameter `pfile' with ATTRIBUTE_UNUSED.
+
+       * flow.c: Include recog.h.
+       (sbitmap_copy): Cast arguments 1 & 2 of `bcopy' to (PTR).
+
+       * function.c (thread_prologue_and_epilogue_insns): Mark parameter
+       `f' with ATTRIBUTE_UNUSED.
+       (reposition_prologue_and_epilogue_notes): Likewise.
+
+       * genopinit.c (gen_insn): Cast argument of ctype functions to
+       `unsigned char'.
+
+       * haifa-sched.c: Include recog.h.
+       (blockage_range): Cast result of UNIT_BLOCKED macro to (int) when
+       comparing against one.
+
+       * libgcc2.a (__throw): Revert ATTRIBUTE_UNUSED change for now.
+
+       * mips-tfile.c (parse_end): Cast the argument of ctype function to
+       `unsigned char'.
+       (parse_ent): Likewise.
+       (parse_input): Likewise.
+
+       * optabs.c (init_libfuncs): Likewise.
+
+       * protoize.c (find_rightmost_formals_list): Likewise.
+
+       * recog.h (const_double_operand): Fix typo in prototype.
+
+       * tlink.c (scan_linker_output): Cast the argument of ctype
+       function to `unsigned char'.
+
+       * toplev.c (check_lang_option): Cast the result of `strlen' to
+       `int' when comparing against one.
+
 Sat Oct 17 13:09:09 1998  Graham  <grahams@rcp.co.uk>
 
        * gcse.c (dump_cuid_table): Correct typo.
index 7d01d8b6ead57e0a9da8ff91e35962aa67267533..6ceb132889902b4d859175b87651c20c7be2c29c 100644 (file)
@@ -1477,7 +1477,7 @@ loop.o : loop.c $(CONFIG_H) system.h $(RTL_H) flags.h loop.h insn-config.h \
 unroll.o : unroll.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
    integrate.h $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) loop.h toplev.h
 flow.o : flow.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-config.h \
-   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h
+   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h recog.h
 combine.o : combine.c $(CONFIG_H) system.h $(RTL_H) flags.h  \
    insn-config.h insn-flags.h insn-codes.h insn-attr.h $(REGS_H) $(EXPR_H) \
    $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h
index 016b1606211d5f3d5a15c95b2cba0f8f774f9546..b45e014351d73f61e2cc29f18167d1ad41a0725f 100644 (file)
@@ -377,7 +377,7 @@ static int do_warning PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHA
    The initialize_builtins function assumes #define is the very first.  */
 
 static struct directive directive_table[] = {
-  {  6, do_define, "define", T_DEFINE},
+  {  6, do_define, "define", T_DEFINE, 0},
   {  5, do_xifdef, "ifdef", T_IFDEF, 1},
   {  6, do_xifdef, "ifndef", T_IFNDEF, 1},
   {  7, do_include, "include", T_INCLUDE, 1},
@@ -387,18 +387,18 @@ static struct directive directive_table[] = {
   {  4, do_else, "else", T_ELSE, 1},
   {  2, do_if, "if", T_IF, 1},
   {  4, do_elif, "elif", T_ELIF, 1},
-  {  5, do_undef, "undef", T_UNDEF},
-  {  5, do_error, "error", T_ERROR},
-  {  7, do_warning, "warning", T_WARNING},
-  {  6, do_pragma, "pragma", T_PRAGMA},
+  {  5, do_undef, "undef", T_UNDEF, 0},
+  {  5, do_error, "error", T_ERROR, 0},
+  {  7, do_warning, "warning", T_WARNING, 0},
+  {  6, do_pragma, "pragma", T_PRAGMA, 0},
   {  4, do_line, "line", T_LINE, 1},
   {  5, do_ident, "ident", T_IDENT, 1},
 #ifdef SCCS_DIRECTIVE
-  {  4, do_sccs, "sccs", T_SCCS},
+  {  4, do_sccs, "sccs", T_SCCS, 0},
 #endif
   {  6, do_assert, "assert", T_ASSERT, 1},
   {  8, do_unassert, "unassert", T_UNASSERT, 1},
-  {  -1, 0, "", T_UNUSED},
+  {  -1, 0, "", T_UNUSED, 0},
 };
 \f
 /* table to tell if char can be part of a C identifier.  */
@@ -5642,7 +5642,7 @@ finclude (pfile, f, fname, system_header_p, dirptr)
        First read the entire file into heap and
        copy them into buffer on stack.  */
 
-    int bsize = 2000;
+    size_t bsize = 2000;
 
     st_size = 0;
     fp->buf = (U_CHAR *) xmalloc (bsize + 2);
index 7e64ef305f2ed98a60d63bdb2e29ee509cb73643..8fb473af57e44e5ebc88a7f4bdadb48076dae7fd 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -702,7 +702,7 @@ notreg_cost (x)
 int
 rtx_cost (x, outer_code)
      rtx x;
-     enum rtx_code outer_code;
+     enum rtx_code outer_code ATTRIBUTE_UNUSED;
 {
   register int i, j;
   register enum rtx_code code;
index b4bb9b9fc165183923e242398584adf64765efb3..29c8dd39d5f05b942a1909926975ed1a25acbd95 100644 (file)
@@ -35,6 +35,8 @@ extern void dwarfout_end_epilogue     PROTO ((void));
 extern void dwarfout_begin_block       PROTO ((unsigned));
 extern void dwarfout_end_block         PROTO ((unsigned));
 
+#ifdef RTX_CODE
 extern void dwarfout_label             PROTO ((rtx));
+#endif
 extern void dwarfout_line              PROTO ((char *, unsigned));
 
index ffeede58362e78ce41a843fbc5cd39a01035e687..e1a9956a18cb5b1811117e1ba15471b4f9a5c488 100644 (file)
@@ -397,7 +397,7 @@ lookup_std_proto (name, name_length)
       if (hash_tab[i] == 0)
        return NULL;
       fn = &std_protos[hash_tab[i]];
-      if (strlen (fn->fname) == name_length
+      if ((int) strlen (fn->fname) == name_length
          && strncmp (fn->fname, name, name_length) == 0)
        return fn;
       i = (i+1) % HASH_SIZE;
@@ -1326,7 +1326,7 @@ main (argc, argv)
 
 void
 cpp_file_line_for_message (pfile, filename, line, column)
-     cpp_reader * pfile;
+     cpp_reader * pfile ATTRIBUTE_UNUSED;
      char *filename;
      int line, column;
 {
@@ -1418,7 +1418,7 @@ fatal VPROTO ((const char *str, ...))
 }
 
 void
-cpp_fatal VPROTO ((cpp_reader * pfile, const char *str, ...))
+cpp_fatal VPROTO ((cpp_reader * pfile ATTRIBUTE_UNUSED, const char *str, ...))
 {
 #ifndef __STDC__
   cpp_reader * pfile;
index 10f9c07344d1ee8c0cc99984d128af0bdbc930d6..8bc8a110ba0c72d217ffe1b850deeb2fdd3858ab 100644 (file)
@@ -122,6 +122,7 @@ Boston, MA 02111-1307, USA.  */
 #include "output.h"
 #include "except.h"
 #include "toplev.h"
+#include "recog.h"
 
 #include "obstack.h"
 #define obstack_chunk_alloc xmalloc
@@ -3687,7 +3688,7 @@ void
 sbitmap_copy (dst, src)
      sbitmap dst, src;
 {
-  bcopy (src->elms, dst->elms, sizeof (SBITMAP_ELT_TYPE) * dst->size);
+  bcopy ((PTR) src->elms, (PTR) dst->elms, sizeof (SBITMAP_ELT_TYPE) * dst->size);
 }
 
 /* Zero all elements in a bitmap.  */
index b209b131164bf10dea1e6c4764d987d8d9be1ddc..e594e7000f58d7b87688383de6a405786821f4e0 100644 (file)
@@ -6183,7 +6183,7 @@ contains (insn, vec)
 
 void
 thread_prologue_and_epilogue_insns (f)
-     rtx f;
+     rtx f ATTRIBUTE_UNUSED;
 {
 #ifdef HAVE_prologue
   if (HAVE_prologue)
@@ -6284,7 +6284,7 @@ thread_prologue_and_epilogue_insns (f)
 
 void
 reposition_prologue_and_epilogue_notes (f)
-     rtx f;
+     rtx f ATTRIBUTE_UNUSED;
 {
 #if defined (HAVE_prologue) || defined (HAVE_epilogue)
   /* Reposition the prologue and epilogue notes.  */
index c8d7859e9785f7aec20156428e7f94280a4d53e7..066a05507081a14c137759895cb3f770358ea38b 100644 (file)
@@ -202,7 +202,7 @@ gen_insn (insn)
                for (i = ((int) MAX_MACHINE_MODE) - 1; i >= 0; i--)
                  {
                    for (p = mode_name[i], q = np; *p; p++, q++)
-                     if (tolower (*p) != *q)
+                     if (tolower ((unsigned char)*p) != *q)
                        break;
 
                    if (*p == 0
@@ -256,11 +256,11 @@ gen_insn (insn)
            break;
          case 'a':
            for (np = mode_name[m1]; *np; np++)
-             printf ("%c", tolower (*np));
+             printf ("%c", tolower ((unsigned char)*np));
            break;
          case 'b':
            for (np = mode_name[m2]; *np; np++)
-             printf ("%c", tolower (*np));
+             printf ("%c", tolower ((unsigned char)*np));
            break;
          case 'A':
            printf ("%smode", mode_name[m1]);
@@ -273,7 +273,7 @@ gen_insn (insn)
            break;
          case 'C':
            for (np = rtx_name[op]; *np; np++)
-             printf ("%c", toupper (*np));
+             printf ("%c", toupper ((unsigned char)*np));
            break;
          }
     }
index f529a958cd47a9ec0c411e14afd760a29212d43f..806bb396d8864142f219249a4aea64e9e47a9c6b 100644 (file)
 #include "insn-attr.h"
 #include "except.h"
 #include "toplev.h"
+#include "recog.h"
 
 extern char *reg_known_equiv_p;
 extern rtx *reg_known_value;
@@ -2858,7 +2859,7 @@ blockage_range (unit, insn)
   unsigned int blockage = INSN_BLOCKAGE (insn);
   unsigned int range;
 
-  if (UNIT_BLOCKED (blockage) != unit + 1)
+  if ((int) UNIT_BLOCKED (blockage) != unit + 1)
     {
       range = function_units[unit].blockage_range_function (insn);
       /* We only cache the blockage range for one unit and then only if
index 09e3c7143ea7d0ff9b8ab6fc010c84b39d1a2c7e..d519f238ddaa002e6129becdefd56955a1185445 100644 (file)
@@ -3637,7 +3637,7 @@ next_stack_level (void *pc, frame_state *udata, frame_state *caller_udata)
    If we find one, then we unwind the frames down to the one that
    has the handler and transfer control into the handler.  */
 
-extern void __throw(void) __attribute__ ((__noreturn__));
+/*extern void __throw(void) __attribute__ ((__noreturn__));*/
 
 void
 __throw ()
index 0922bf1ad14d21a9087fa7cb8b17061b7dcaa8dd..c1407703077f418c3266016f75bf7ac7928291eb 100644 (file)
@@ -3472,7 +3472,7 @@ parse_end (start)
     }
 
   /* Get the function name, skipping whitespace.  */
-  for (start_func = start; ISSPACE (*start_func); start_func++)
+  for (start_func = start; ISSPACE ((unsigned char)*start_func); start_func++)
     ;
 
   ch = *start_func;
@@ -3531,7 +3531,7 @@ parse_ent (start)
       return;
     }
 
-  for (start_func = start; ISSPACE (*start_func); start_func++)
+  for (start_func = start; ISSPACE ((unsigned char)*start_func); start_func++)
     ;
 
   ch = *start_func;
@@ -3871,16 +3871,16 @@ parse_input __proto((void))
   while ((p = read_line ()) != (char *) 0)
     {
       /* Skip leading blanks */
-      while (ISSPACE (*p))
+      while (ISSPACE ((unsigned char)*p))
        p++;
 
       /* See if it's a directive we handle.  If so, dispatch handler.  */
       for (i = 0; i < sizeof (pseudo_ops) / sizeof (pseudo_ops[0]); i++)
        if (memcmp (p, pseudo_ops[i].name, pseudo_ops[i].len) == 0
-           && ISSPACE (p[pseudo_ops[i].len]))
+           && ISSPACE ((unsigned char)(p[pseudo_ops[i].len])))
          {
            p += pseudo_ops[i].len;     /* skip to first argument */
-           while (ISSPACE (*p))
+           while (ISSPACE ((unsigned char)*p))
              p++;
 
            (*pseudo_ops[i].func)( p );
index f4095c82bde7e47de50f5d01f855ce3560c7c2b5..801b8535dd128ba139666938697e91fa2b1a9a7f 100644 (file)
@@ -4034,7 +4034,7 @@ init_libfuncs (optable, first_mode, last_mode, opname, suffix)
       for (q = opname; *q; )
        *p++ = *q++;
       for (q = mname; *q; q++)
-       *p++ = tolower (*q);
+       *p++ = tolower ((unsigned char)*q);
       *p++ = suffix;
       *p++ = '\0';
       optable->handlers[(int) mode].libfunc
index 3ba8b96be8b59c068d54858277b9f40e32d3a384..18187a6c9cd4788686402e82ab75169365c3f432 100644 (file)
@@ -3447,8 +3447,8 @@ find_rightmost_formals_list (clean_text_p)
 
     while (*end_formals != ')')
       {
-       if (ISSPACE (*end_formals))
-         while (ISSPACE (*end_formals))
+       if (ISSPACE ((unsigned char)*end_formals))
+         while (ISSPACE ((unsigned char)*end_formals))
            check_source (--end_formals > clean_read_ptr, 0);
        else
          check_source (--end_formals > clean_read_ptr, 0);
index 195efe39264e9ddf9a8b73be0019ecf6d2997f40..1bf77b4d0fcce9496489338bded96fb7ef8455c7 100644 (file)
@@ -44,7 +44,7 @@ extern int register_operand           PROTO((rtx, enum machine_mode));
 extern int scratch_operand             PROTO((rtx, enum machine_mode));
 extern int immediate_operand           PROTO((rtx, enum machine_mode));
 extern int const_int_operand           PROTO((rtx, enum machine_mode));
-extern int cosnt_double_operand                PROTO((rtx, enum machine_mode));
+extern int const_double_operand                PROTO((rtx, enum machine_mode));
 extern int nonimmediate_operand                PROTO((rtx, enum machine_mode));
 extern int nonmemory_operand           PROTO((rtx, enum machine_mode));
 extern int push_operand                        PROTO((rtx, enum machine_mode));
index a4c5b5311cdabbbb42805df909286017d0912784..0ec3f9a10644e908a8aac169a3125c6a05cd6fc0 100644 (file)
@@ -530,13 +530,13 @@ scan_linker_output (fname)
       symbol *sym;
       int end;
       
-      while (*p && ISSPACE (*p))
+      while (*p && ISSPACE ((unsigned char)*p))
        ++p;
 
       if (! *p)
        continue;
 
-      for (q = p; *q && ! ISSPACE (*q); ++q)
+      for (q = p; *q && ! ISSPACE ((unsigned char)*q); ++q)
        ;
 
       /* Try the first word on the line.  */
index 7d866d694ff5221ab0ad5802cc5ae78f52b59e60..8ad8eebc073df4af3aee1d236e9963f4df397bab 100644 (file)
@@ -4179,7 +4179,7 @@ check_lang_option (option, lang_option)
      -fpack-struct.  */
   
   /* An exact match is OK  */
-  if (strlen (option) == len)
+  if ((int) strlen (option) == len)
     return 1;
   
   /* If it is not an -f or -W option allow the match */