Warning fixes:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Mon, 29 Jun 1998 17:36:07 +0000 (17:36 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Mon, 29 Jun 1998 17:36:07 +0000 (17:36 +0000)
        * Makefile.in (fix-header): Don't needlessly depend on cpperror.o.
        * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): Cast expansion to
        void since it is evaluated in a comma list.
        * mips.h (ASM_GENERATE_INTERNAL_LABEL): Always sprintf `NUM'
        argument as a long and cast `NUM' to long to ensure it is of the
        proper width.  Wrap macro arguments in parens when they appear in
        the expansion.
        * sol2.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
        * sparc.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
        (ASM_DECLARE_RESULT): Fix fprintf format specifier to match
        function argument return type.
        (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P, REGNO_OK_FOR_FP_P,
        REGNO_OK_FOR_CCFP_P): Use `(unsigned)' not `U'.
        * cpplib.c (cpp_message_from_errno): Remove unneeded argument to
        cpp_message.
        * dbxout.c: Fix the comments after an #endif to reflect the actual
        condition tested in the preceding #if.
        * except.c (find_all_handler_type_matches): Switch to old-style
        function definition.
        * expr.c (expand_builtin): Remove unused variable `type' twice.
        * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Cast -1 before comparing it
        to an unsigned long.
        * haifa-sched.c (print_insn_chain): Remove unused function.
        * objc/objc-act.c (build_msg_pool_reference): Hide prototype and
        definition.
        * toplev.c: When testing whether to include dbxout.h, also include
        it when XCOFF_DEBUGGING_INFO is defined.
        * unroll.c (unroll_loop): Add parentheses around assignment used
        as truth value.

From-SVN: r20801

15 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/alias.c
gcc/config/mips/mips.h
gcc/config/sparc/sol2.h
gcc/config/sparc/sparc.h
gcc/cpplib.c
gcc/dbxout.c
gcc/except.c
gcc/expr.c
gcc/gbl-ctors.h
gcc/haifa-sched.c
gcc/objc/objc-act.c
gcc/toplev.c
gcc/unroll.c

index cb24b610c42012222423d1d9ca5469aaffb4a8a2..794fa99187f3fd77616fb85f4847f69924167a28 100644 (file)
@@ -1,3 +1,48 @@
+Mon Jun 29 20:12:41 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+        * Makefile.in (fix-header): Don't needlessly depend on cpperror.o.
+
+       * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): Cast expansion to
+       void since it is evaluated in a comma list.
+
+       * mips.h (ASM_GENERATE_INTERNAL_LABEL): Always sprintf `NUM'
+       argument as a long and cast `NUM' to long to ensure it is of the
+       proper width.  Wrap macro arguments in parens when they appear in
+       the expansion.
+
+       * sol2.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
+
+       * sparc.h (ASM_GENERATE_INTERNAL_LABEL): Likewise.
+       (ASM_DECLARE_RESULT): Fix fprintf format specifier to match
+       function argument return type.
+       (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P, REGNO_OK_FOR_FP_P,
+       REGNO_OK_FOR_CCFP_P): Use `(unsigned)' not `U'.
+
+       * cpplib.c (cpp_message_from_errno): Remove unneeded argument to
+       cpp_message.
+
+        * dbxout.c: Fix the comments after an #endif to reflect the actual
+       condition tested in the preceding #if.
+
+       * except.c (find_all_handler_type_matches): Switch to old-style
+       function definition.
+
+       * expr.c (expand_builtin): Remove unused variable `type' twice.
+
+        * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Cast -1 before comparing it
+       to an unsigned long.
+
+       * haifa-sched.c (print_insn_chain): Remove unused function.
+
+        * objc/objc-act.c (build_msg_pool_reference): Hide prototype and
+       definition.
+
+        * toplev.c: When testing whether to include dbxout.h, also include
+       it when XCOFF_DEBUGGING_INFO is defined.
+
+        * unroll.c (unroll_loop): Add parentheses around assignment used
+       as truth value.
+
 Mon Jun 29 12:18:00 1998  Catherine Moore  <clm@cygnus.com>
 
         * config/lb1spc.asm (.div, .udiv): Replace routines.
index d4d4c13f6d7cb13f96f7ac54cc158361e4f7cd92..36d9ee16063e63a80386d7a63675f2f0edd70a3b 100644 (file)
@@ -2047,7 +2047,7 @@ xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefil
        rm -rf fixtmp.c
 
 fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
-   cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o prefix.o version.o
+   cpplib.o cpphash.o cppalloc.o cppexp.o prefix.o version.o
        $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
           scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o prefix.o \
           version.o cppexp.o $(HOST_LIBS)
index ab65bc4d8eacbd06045ce543ef1f64831b9ec117..de471394d561949fa2daf8192abe64c4e37fa71e 100644 (file)
@@ -54,7 +54,7 @@ static rtx find_base_value            PROTO((rtx));
    && (MEM_ALIAS_SET (MEM1) || MEM_ALIAS_SET (MEM2))   \
    ? (abort (), 0) : 0)
 #else 
-#define CHECK_ALIAS_SETS_FOR_CONSISTENCY(MEM1, MEM2) 0
+#define CHECK_ALIAS_SETS_FOR_CONSISTENCY(MEM1, MEM2) ((void)0)
 #endif
 
 /* Returns nonzero if MEM1 and MEM2 do not alias because they are in
index fb6f0513ab89f4f9e7a1abf1d8e0ebef82682ccd..590895936b56e70cab9c5e5b3312d43e2b43779e 100644 (file)
@@ -4110,7 +4110,7 @@ while (0)
    This is suitable for output with `assemble_name'.  */
 
 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)                  \
-  sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM)
+  sprintf ((LABEL), "*%s%s%ld", (LOCAL_LABEL_PREFIX), (PREFIX), (long)(NUM))
 
 /* This is how to output an assembler line defining a `double' constant.  */
 
index 1cb0a6b47a15d5201011b32f9cb796a6e6f72d1a..dfcb3b96970af826f1b9b5129700751408873093 100644 (file)
@@ -107,7 +107,7 @@ Boston, MA 02111-1307, USA.  */
 
 #undef  ASM_GENERATE_INTERNAL_LABEL
 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)  \
-  sprintf (LABEL, "*.L%s%d", PREFIX, NUM)
+  sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
 
 \f
 /* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us.
index 198f256ba6c64c4d39fd5ba5d7123a5a8be71ed8..5d2059c561c410798d0433fdedf1a65034759306 100644 (file)
@@ -1683,7 +1683,7 @@ extern int gen_v9_scc ();
    the assembler).  */
 
 #define ASM_DECLARE_RESULT(FILE, RESULT) \
-  fprintf ((FILE), "\t.proc\t0%o\n", sparc_type_code (TREE_TYPE (RESULT)))
+  fprintf ((FILE), "\t.proc\t0%lo\n", sparc_type_code (TREE_TYPE (RESULT)))
 
 /* Output the label for a function definition.  */
 
@@ -2245,16 +2245,16 @@ extern struct rtx_def *sparc_builtin_saveregs ();
    has been allocated, which happens in local-alloc.c.  */
 
 #define REGNO_OK_FOR_INDEX_P(REGNO) \
-((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32U)
+((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < (unsigned)32)
 #define REGNO_OK_FOR_BASE_P(REGNO) \
-((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32U)
+((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < (unsigned)32)
 #define REGNO_OK_FOR_FP_P(REGNO) \
-  (((unsigned) (REGNO) - 32 < (TARGET_V9 ? 64U : 32U)) \
-   || ((unsigned) reg_renumber[REGNO] - 32 < (TARGET_V9 ? 64U : 32U)))
+  (((unsigned) (REGNO) - 32 < (TARGET_V9 ? (unsigned)64 : (unsigned)32)) \
+   || ((unsigned) reg_renumber[REGNO] - 32 < (TARGET_V9 ? (unsigned)64 : (unsigned)32)))
 #define REGNO_OK_FOR_CCFP_P(REGNO) \
  (TARGET_V9 \
-  && (((unsigned) (REGNO) - 96 < 4U) \
-      || ((unsigned) reg_renumber[REGNO] - 96 < 4U)))
+  && (((unsigned) (REGNO) - 96 < (unsigned)4) \
+      || ((unsigned) reg_renumber[REGNO] - 96 < (unsigned)4)))
 
 /* Now macros that check whether X is a register and also,
    strictly, whether it is in a specified class.
@@ -2888,7 +2888,7 @@ extern struct rtx_def *legitimize_pic_address ();
    This is suitable for output with `assemble_name'.  */
 
 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)  \
-  sprintf (LABEL, "*%s%d", PREFIX, NUM)
+  sprintf ((LABEL), "*%s%ld", (PREFIX), (long)(NUM))
 
 /* This is how to output an assembler line defining a `float' constant.
    We always have to use a .long pseudo-op to do this because the native
index 5f699c8ee07d00504ddcce1654e1303640cd9d15..bad82c304c8c40d1581624fa9732e08673c0d859 100644 (file)
@@ -7656,7 +7656,7 @@ cpp_message_from_errno (pfile, is_error, name)
   if (ip != NULL)
     cpp_file_line_for_message (pfile, ip->nominal_fname, ip->lineno, -1);
 
-  cpp_message (pfile, is_error, "%s: %s", name, my_strerror (e), "");
+  cpp_message (pfile, is_error, "%s: %s", name, my_strerror (e));
 }
 
 void
index 13bef7de95db69779fceb31558bce56012c562a6..e9e7072feb1cef5b0447cb9276b529f1e5ff4241 100644 (file)
@@ -2710,4 +2710,4 @@ dbxout_function (decl)
     dbxout_function_end ();
 #endif
 }
-#endif /* DBX_DEBUGGING_INFO */
+#endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
index 86871d0eea81f8d28d6ff6dda13eb385e09169f3..3ed0c915eb629b70d877bbab9f47ab1346400adb 100644 (file)
@@ -792,7 +792,8 @@ void remove_handler (removing_label)
    currently exist in all regions. */
 
 int 
-find_all_handler_type_matches (void ***array)
+find_all_handler_type_matches (array)
+  void ***array;
 {
   struct handler_info *handler, *last;
   int x,y;
index bc19068afaa88e007e21098ea152bc19b5cc8200..c6728457c4fba2c7560ed921eb2d9286cff45582 100644 (file)
@@ -8769,7 +8769,6 @@ expand_builtin (exp, target, subtarget, mode, ignore)
          tree dest = TREE_VALUE (arglist);
          tree src = TREE_VALUE (TREE_CHAIN (arglist));
          tree len = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist)));
-         tree type;
 
          int src_align
            = get_pointer_alignment (src, BIGGEST_ALIGNMENT) / BITS_PER_UNIT;
@@ -8830,7 +8829,6 @@ expand_builtin (exp, target, subtarget, mode, ignore)
          tree dest = TREE_VALUE (arglist);
          tree val = TREE_VALUE (TREE_CHAIN (arglist));
          tree len = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist)));
-         tree type;
 
          int dest_align
            = get_pointer_alignment (dest, BIGGEST_ALIGNMENT) / BITS_PER_UNIT;
index 281dcd6e8d1fc8bbe3839a607c5fa4c2042718ac..86b1c0ebcacfcee809007568cfe6100cc6839e68 100644 (file)
@@ -83,7 +83,7 @@ extern void __do_global_dtors (void);
 do {                                                                   \
   unsigned long nptrs = (unsigned long) __CTOR_LIST__[0];              \
   unsigned i;                                                          \
-  if (nptrs == -1)                                                     \
+  if (nptrs == (unsigned long)-1)                                      \
     for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++);           \
   for (i = nptrs; i >= 1; i--)                                         \
     __CTOR_LIST__[i] ();                                               \
index fff73ca8b1b06ba4031d207f465102d822b9469e..5452478eb17041ee583db170dfdf860540dcedea 100644 (file)
@@ -456,7 +456,6 @@ static char *safe_concat PROTO ((char *, char *, char *));
 static int insn_issue_delay PROTO ((rtx));
 static int birthing_insn_p PROTO ((rtx));
 static void adjust_priority PROTO ((rtx));
-static void print_insn_chain PROTO ((rtx));
 
 /* Mapping of insns to their original block prior to scheduling.  */
 static int *insn_orig_block;
@@ -6277,36 +6276,6 @@ print_insn (buf, x, verbose)
     }
 }                              /* print_insn */
 
-void
-print_insn_chain (rtx_first)
-     rtx rtx_first;
-{
-  register rtx tmp_rtx;
-  char str[BUF_LEN];
-
-  strcpy (str, "(nil)\n");
-  if (rtx_first != 0)
-    switch (GET_CODE (rtx_first))
-      {
-      case INSN:
-      case JUMP_INSN:
-      case CALL_INSN:
-      case NOTE:
-      case CODE_LABEL:
-      case BARRIER:
-       for (tmp_rtx = rtx_first; tmp_rtx != NULL;
-            tmp_rtx = NEXT_INSN (tmp_rtx))
-         {
-           print_insn (str, tmp_rtx, 0);
-           printf ("%s\n", str);
-         }
-       break;
-      default:
-       print_insn (str, rtx_first, 0);
-       printf ("%s\n", str);
-      }
-}                              /* print_insn_chain */
-
 /* Print visualization debugging info */
 
 static void
index 4afc08e27df1b14988ab4bc6f853287742bdc24e..0f4058b2b5c45341dd791d99681e005af01efab5 100644 (file)
@@ -297,7 +297,9 @@ static tree init_objc_symtab                        PROTO((tree));
 static void forward_declare_categories         PROTO((void));
 static void generate_objc_symtab_decl          PROTO((void));
 static tree build_selector                     PROTO((tree));
+#if 0
 static tree build_msg_pool_reference           PROTO((int));
+#endif
 static tree build_typed_selector_reference             PROTO((tree, tree));
 static tree build_selector_reference           PROTO((tree));
 static tree build_class_reference_decl         PROTO((tree));
@@ -2042,6 +2044,7 @@ build_selector (ident)
    grok.m: warning: initialization of non-const * pointer from const *
    grok.m: warning: initialization between incompatible pointer types.  */
 
+#if 0
 static tree
 build_msg_pool_reference (offset)
      int offset;
@@ -2059,7 +2062,6 @@ build_msg_pool_reference (offset)
   return expr;
 }
 
-#if 0
 static tree
 init_selector (offset)
      int offset;
index b1987336cb1e3dab9b72e3efada92a4fc84234e1..38bba1be03a5ddfa833bad124f63996b1ea02eb6 100644 (file)
@@ -65,7 +65,7 @@ Boston, MA 02111-1307, USA.  */
 #include "dwarf2out.h"
 #endif
 
-#ifdef DBX_DEBUGGING_INFO
+#if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO)
 #include "dbxout.h"
 #endif
 
index 7b745b2ab084cbcbfde54de99ab9d87b0ed0fc31..c6de53b663a2f1cf466c8e16b8b99a74b8e9f484 100644 (file)
@@ -718,7 +718,7 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
                }
            }
        }
-      else if (note = find_reg_note (insn, REG_LABEL, NULL_RTX))
+      else if ((note = find_reg_note (insn, REG_LABEL, NULL_RTX)))
        set_label_in_map (map, CODE_LABEL_NUMBER (XEXP (note, 0)),
                          XEXP (note, 0));
     }