aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-06-29 17:36:07 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-06-29 17:36:07 +0000
commit4f70758f3747997152952ed15ebd75d0b5575972 (patch)
tree07c5fd6d4cde7e41ec1d7a902a997120ed06ebdd /gcc
parentd0902cd14bd55a38e0a049e885df3647ecbe3aee (diff)
downloadgcc-4f70758f3747997152952ed15ebd75d0b5575972.zip
gcc-4f70758f3747997152952ed15ebd75d0b5575972.tar.gz
gcc-4f70758f3747997152952ed15ebd75d0b5575972.tar.bz2
Warning fixes:
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog45
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/alias.c2
-rw-r--r--gcc/config/mips/mips.h2
-rw-r--r--gcc/config/sparc/sol2.h2
-rw-r--r--gcc/config/sparc/sparc.h16
-rw-r--r--gcc/cpplib.c2
-rw-r--r--gcc/dbxout.c2
-rw-r--r--gcc/except.c3
-rw-r--r--gcc/expr.c2
-rw-r--r--gcc/gbl-ctors.h2
-rw-r--r--gcc/haifa-sched.c31
-rw-r--r--gcc/objc/objc-act.c4
-rw-r--r--gcc/toplev.c2
-rw-r--r--gcc/unroll.c2
15 files changed, 67 insertions, 52 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cb24b61..794fa99 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index d4d4c13..36d9ee1 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -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)
diff --git a/gcc/alias.c b/gcc/alias.c
index ab65bc4..de47139 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -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
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index fb6f051..5908959 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -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. */
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h
index 1cb0a6b..dfcb3b9 100644
--- a/gcc/config/sparc/sol2.h
+++ b/gcc/config/sparc/sol2.h
@@ -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))
/* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us.
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index 198f256..5d2059c 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -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
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 5f699c8..bad82c3 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -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
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 13bef7d..e9e7072 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -2710,4 +2710,4 @@ dbxout_function (decl)
dbxout_function_end ();
#endif
}
-#endif /* DBX_DEBUGGING_INFO */
+#endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
diff --git a/gcc/except.c b/gcc/except.c
index 86871d0..3ed0c91 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -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;
diff --git a/gcc/expr.c b/gcc/expr.c
index bc19068a..c672845 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -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;
diff --git a/gcc/gbl-ctors.h b/gcc/gbl-ctors.h
index 281dcd6..86b1c0e 100644
--- a/gcc/gbl-ctors.h
+++ b/gcc/gbl-ctors.h
@@ -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] (); \
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index fff73ca..5452478 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -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
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 4afc08e..0f4058b 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -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;
diff --git a/gcc/toplev.c b/gcc/toplev.c
index b198733..38bba1b 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -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
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 7b745b2..c6de53b 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -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));
}