This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

more warning patches, part 1/3


	More warning patches.  This is part 1/3.  Okay to install?

		--Kaveh

(PS: Jeff, this set also includes the conditional ATTRIBUTE_UNUSED
hacks.  I'll remove them before final checkin.)



Tue Oct 13 18:32:19 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* Makefile.in (sched.o): Depend on recog.h.

	* alias.c (REG_BASE_VALUE): Cast the result of REGNO() macro to
	(unsigned) when comparing against one.
	(find_base_value): Likewise.
	(record_base_value): Cast variable `regno' to (unsigned) when
	comparing against one.  Cast the result of REGNO() macro to
	(unsigned) when comparing against one.
	(memrefs_conflict_p): Change type of variables `r_x' and `r_y'  to
	unsigned.
	(init_alias_analysis): Add unsigned variable `ui'.  Use it as loop
	variable where an unsigned index is needed.

	* caller-save.c (init_caller_save): Cast `-1' to (enum insn_code)
	before comparing against one.

	* collect2.c: Add prototypes for functions `error', `fatal' and
	`fatal_perror'.  Make these functions take variable arguments
	instead of faking it with a fixed number of args.
	(write_c_file_stat): Cast the argument of ctype macro to (unsigned
	char).

	* combine.c (can_combine_p): Mark parameter `pred' with
	ATTRIBUTE_UNUSED.
	(find_split_point): Cast variable `src' to (unsigned
	HOST_WIDE_INT) when comparing against one.
	(simplify_rtx): Cast 1 to (unsigned HOST_WIDE_INT) in shift.
	(simplify_logical): Likewise.
	(force_to_mode): Cast result of INTVAL() macro to (unsigned
	HOST_WIDE_INT) when comparing against one.  Cast 1 to (unsigned
	HOST_WIDE_INT) in shift.
	(simplify_and_const_int): Cast result of INTVAL() macro to
	`unsigned HOST_WIDE_INT' when comparing against one.
	(merge_outer_ops): Cast variable const0 to `unsigned
	HOST_WIDE_INT' when comparing against the result of
	GET_MODE_MASK() macro.
	(simplify_comparison): Likewise for variable `c0'.  Cast variable
	`const_op' to `unsigned HOST_WIDE_INT' when comparing against
	one.  Cast `1' to `unsigned HOST_WIDE_INT' in shift.  Cast the
	result of `GET_MODE_MASK()/2' to `HOST_WIDE_INT' when comparing
	against one.  Cast `1' to `unsigned HOST_WIDE_INT' in shift.  Cast
	result of INTVAL() macro to `unsigned HOST_WIDE_INT' when
	comparing against one.
	(distribute_notes): Wrap variable `cc0_setter' in macro `HAVE_cc0'.

	config/mips/mips.c (gen_int_relational): Cast result of INTVAL()
	macro to `unsigned HOST_WIDE_INT' when comparing against one.
	(output_block_move): Cast `sizeof' expression to (int) when
	comparing against one.
	(function_arg): Cast BITS_PER_WORD to `unsigned' when comparing
	against one.
	(save_restore_insns): Cast `base_offset' to `long' to match format
	specifier in fprintf.

	* config/mips/mips.h (Pmode): Cast the result of `Pmode' macro
	to `enum machine_mode'.

	* flow.c (life_analysis_1): Remove unused variable `insn'.

diff -rup orig/egcs-CVS19981012/gcc/Makefile.in egcs-CVS19981012/gcc/Makefile.in
--- orig/egcs-CVS19981012/gcc/Makefile.in	Tue Oct 13 17:37:25 1998
+++ egcs-CVS19981012/gcc/Makefile.in	Tue Oct 13 11:37:24 1998
@@ -1511,8 +1511,8 @@ regmove.o : regmove.c $(CONFIG_H) system
    $(RECOG_H) output.h reload.h $(REGS_H) hard-reg-set.h flags.h \
    $(EXPR_H) insn-flags.h $(BASIC_BLOCK_H) toplev.h
 $(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) system.h $(RTL_H) \
-   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \
-   toplev.h
+   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h \
+   insn-attr.h toplev.h recog.h
 final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h $(REGS_H) \
    $(RECOG_H) conditions.h insn-config.h insn-attr.h except.h real.h output.h \
    hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h \
diff -rup orig/egcs-CVS19981012/gcc/alias.c egcs-CVS19981012/gcc/alias.c
--- orig/egcs-CVS19981012/gcc/alias.c	Mon Oct 12 21:08:08 1998
+++ egcs-CVS19981012/gcc/alias.c	Tue Oct 13 09:56:31 1998
@@ -93,7 +93,7 @@ rtx *reg_base_value;
 rtx *new_reg_base_value;
 unsigned int reg_base_value_size;	/* size of reg_base_value array */
 #define REG_BASE_VALUE(X) \
-	(REGNO (X) < reg_base_value_size ? reg_base_value[REGNO (X)] : 0)
+  ((unsigned) REGNO (X) < reg_base_value_size ? reg_base_value[REGNO (X)] : 0)
 
 /* Vector of known invariant relationships between registers.  Set in
    loop unrolling.  Indexed by register number, if nonzero the value
@@ -157,7 +157,7 @@ find_base_value (src)
 	 The test above is not sufficient because the scheduler may move
 	 a copy out of an arg reg past the NOTE_INSN_FUNCTION_BEGIN.  */
       if (REGNO (src) >= FIRST_PSEUDO_REGISTER
-	  && REGNO (src) < reg_base_value_size
+	  && (unsigned) REGNO (src) < reg_base_value_size
 	  && reg_base_value[REGNO (src)])
 	return reg_base_value[REGNO (src)];
 
@@ -340,7 +340,7 @@ record_base_value (regno, val, invariant
      rtx val;
      int invariant;
 {
-  if (regno >= reg_base_value_size)
+  if ((unsigned) regno >= reg_base_value_size)
     return;
 
   /* If INVARIANT is true then this value also describes an invariant
@@ -351,7 +351,7 @@ record_base_value (regno, val, invariant
 
   if (GET_CODE (val) == REG)
     {
-      if (REGNO (val) < reg_base_value_size)
+      if ((unsigned) REGNO (val) < reg_base_value_size)
 	{
 	  reg_base_value[regno] = reg_base_value[REGNO (val)];
 	}
@@ -791,7 +793,7 @@ memrefs_conflict_p (xsize, x, ysize, y, 
 	/* Are these registers known not to be equal?  */
 	if (alias_invariant)
 	  {
-	    int r_x = REGNO (x), r_y = REGNO (y);
+	    unsigned int r_x = REGNO (x), r_y = REGNO (y);
 	    rtx i_x, i_y;	/* invariant relationships of X and Y */
 
 	    i_x = r_x >= reg_base_value_size ? 0 : alias_invariant[r_x];
@@ -1055,6 +1057,7 @@ init_alias_analysis ()
   int maxreg = max_reg_num ();
   int changed, pass;
   register int i;
+  register unsigned int ui;
   register rtx insn;
 
   reg_known_value_size = maxreg;
@@ -1194,13 +1197,13 @@ init_alias_analysis ()
 	}
 
       /* Now propagate values from new_reg_base_value to reg_base_value.  */
-      for (i = 0; i < reg_base_value_size; i++)
+      for (ui = 0; ui < reg_base_value_size; ui++)
 	{
-	  if (new_reg_base_value[i]
-	      && new_reg_base_value[i] != reg_base_value[i]
-	      && ! rtx_equal_p (new_reg_base_value[i], reg_base_value[i]))
+	  if (new_reg_base_value[ui]
+	      && new_reg_base_value[ui] != reg_base_value[ui]
+	      && ! rtx_equal_p (new_reg_base_value[ui], reg_base_value[ui]))
 	    {
-	      reg_base_value[i] = new_reg_base_value[i];
+	      reg_base_value[ui] = new_reg_base_value[ui];
 	      changed = 1;
 	    }
 	}
@@ -1227,16 +1230,16 @@ init_alias_analysis ()
     {
       changed = 0;
       pass++;
-      for (i = 0; i < reg_base_value_size; i++)
+      for (ui = 0; ui < reg_base_value_size; ui++)
 	{
-	  rtx base = reg_base_value[i];
+	  rtx base = reg_base_value[ui];
 	  if (base && GET_CODE (base) == REG)
 	    {
-	      int base_regno = REGNO (base);
-	      if (base_regno == i)		/* register set from itself */
-		reg_base_value[i] = 0;
+	      unsigned int base_regno = REGNO (base);
+	      if (base_regno == ui)		/* register set from itself */
+		reg_base_value[ui] = 0;
 	      else
-		reg_base_value[i] = reg_base_value[base_regno];
+		reg_base_value[ui] = reg_base_value[base_regno];
 	      changed = 1;
 	    }
 	}
diff -rup orig/egcs-CVS19981012/gcc/caller-save.c egcs-CVS19981012/gcc/caller-save.c
--- orig/egcs-CVS19981012/gcc/caller-save.c	Mon Oct 12 21:08:13 1998
+++ egcs-CVS19981012/gcc/caller-save.c	Tue Oct 13 11:35:03 1998
@@ -188,7 +188,8 @@ init_caller_save ()
 
 	  /* Now extract both insns and see if we can meet their
              constraints.  */
-	  ok = (reg_save_code[i][j] != -1 && reg_restore_code[i][j] != -1);
+	  ok = (reg_save_code[i][j] != (enum insn_code)-1
+		&& reg_restore_code[i][j] != (enum insn_code)-1);
 	  if (ok)
 	    {
 	      insn_extract (saveinsn);
diff -rup orig/egcs-CVS19981012/gcc/collect2.c egcs-CVS19981012/gcc/collect2.c
--- orig/egcs-CVS19981012/gcc/collect2.c	Mon Oct 12 21:08:16 1998
+++ egcs-CVS19981012/gcc/collect2.c	Tue Oct 13 13:57:15 1998
@@ -263,6 +263,11 @@ static struct path_prefix *libpaths[3] =
 static char *libexts[3] = {"a", "so", NULL};  /* possible library extentions */
 #endif
 
+void error		PVPROTO((const char *, ...)) ATTRIBUTE_PRINTF_1;
+void fatal		PVPROTO((const char *, ...)) 
+  ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fatal_perror	PVPROTO((const char *, ...))
+  ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
 static char *my_strerror	PROTO((int));
 static const char *my_strsignal	PROTO((int));
 static void handler		PROTO((int));
@@ -406,38 +411,72 @@ collect_exit (status)
 /* Die when sys call fails.  */
 
 void
-fatal_perror (string, arg1, arg2, arg3)
-     char *string, *arg1, *arg2, *arg3;
+fatal_perror VPROTO((const char * string, ...))
 {
+#ifndef __STDC__
+  const char *string;
+#endif
   int e = errno;
+  va_list ap;
+
+  VA_START (ap, string);
+
+#ifndef __STDC__
+  string = va_arg (ap, const char *);
+#endif
 
   fprintf (stderr, "collect2: ");
-  fprintf (stderr, string, arg1, arg2, arg3);
+  vfprintf (stderr, string, ap);
   fprintf (stderr, ": %s\n", my_strerror (e));
+  va_end (ap);
+
   collect_exit (FATAL_EXIT_CODE);
 }
 
 /* Just die.  */
 
 void
-fatal (string, arg1, arg2, arg3)
-     char *string, *arg1, *arg2, *arg3;
+fatal VPROTO((const char * string, ...))
 {
+#ifndef __STDC__
+  const char *string;
+#endif
+  va_list ap;
+  
+  VA_START (ap, string);
+
+#ifndef __STDC__
+  string = va_arg (ap, const char *);
+#endif
+  
   fprintf (stderr, "collect2: ");
-  fprintf (stderr, string, arg1, arg2, arg3);
+  vfprintf (stderr, string, ap);
   fprintf (stderr, "\n");
+  va_end (ap);
+
   collect_exit (FATAL_EXIT_CODE);
 }
 
 /* Write error message.  */
 
 void
-error (string, arg1, arg2, arg3, arg4)
-     char *string, *arg1, *arg2, *arg3, *arg4;
+error VPROTO((const char * string, ...))
 {
+#ifndef __STDC__
+  const char * string;
+#endif
+  va_list ap;
+ 
+  VA_START (ap, string);
+  
+#ifndef __STDC__
+  string = va_arg (ap, const char *);
+#endif
+
   fprintf (stderr, "collect2: ");
-  fprintf (stderr, string, arg1, arg2, arg3, arg4);
+  vfprintf (stderr, string, ap);
   fprintf (stderr, "\n");
+  va_end(ap);
 }
 
 /* In case obstack is linked in, and abort is defined to fancy_abort,
@@ -1934,7 +1973,7 @@ write_c_file_stat (stream, name)
   strncpy (prefix, p, q - p);
   prefix[q - p] = 0;
   for (q = prefix; *q; q++)
-    if (!ISALNUM (*q))
+    if (!ISALNUM ((unsigned char)*q))
       *q = '_';
   if (debug)
     fprintf (stderr, "\nwrite_c_file - output name is %s, prefix is %s\n",
diff -rup orig/egcs-CVS19981012/gcc/combine.c egcs-CVS19981012/gcc/combine.c
--- orig/egcs-CVS19981012/gcc/combine.c	Mon Oct 12 21:08:17 1998
+++ egcs-CVS19981012/gcc/combine.c	Tue Oct 13 10:38:49 1998
@@ -816,7 +816,12 @@ static int
 can_combine_p (insn, i3, pred, succ, pdest, psrc)
      rtx insn;
      rtx i3;
-     rtx pred, succ;
+     rtx pred
+#ifndef HAVE_cc0
+  ATTRIBUTE_UNUSED
+#endif
+  ;
+     rtx succ;
      rtx *pdest, *psrc;
 {
   int i;
@@ -2750,7 +2755,7 @@ find_split_point (loc, insn)
 	  if (BITS_BIG_ENDIAN)
 	    pos = GET_MODE_BITSIZE (mode) - len - pos;
 
-	  if (src == mask)
+	  if ((unsigned HOST_WIDE_INT) src == mask)
 	    SUBST (SET_SRC (x),
 		   gen_binary (IOR, mode, dest, GEN_INT (src << pos)));
 	  else
@@ -4119,7 +4124,7 @@ simplify_rtx (x, op0_mode, last, in_dest
 	  if (new_code == NE && GET_MODE_CLASS (mode) == MODE_INT
 	      && 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))
 	      && op1 == const0_rtx
 	      && mode == GET_MODE (op0)
 	      && (i = exact_log2 (nonzero_bits (op0, mode))) >= 0)
@@ -5086,7 +5091,7 @@ simplify_logical (x, last)
 	 when STORE_FLAG_VALUE is the sign bit.  */
       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))
 	  && op1 == const_true_rtx
 	  && GET_RTX_CLASS (GET_CODE (op0)) == '<'
 	  && reversible_comparison_p (op0))
@@ -6319,7 +6324,7 @@ force_to_mode (x, mode, mask, reg, just_
 	     need it.  */
 
 	  if (GET_CODE (x) == AND && GET_CODE (XEXP (x, 1)) == CONST_INT
-	      && INTVAL (XEXP (x, 1)) == mask)
+	      && (unsigned HOST_WIDE_INT) INTVAL (XEXP (x, 1)) == mask)
 	    x = XEXP (x, 0);
 
 	  /* If it remains an AND, try making another AND with the bits
@@ -6540,7 +6545,7 @@ force_to_mode (x, mode, mask, reg, just_
       /* If we are just looking for the sign bit, we don't need this shift at
 	 all, even if it has a variable count.  */
       if (GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT
-	  && (mask == ((HOST_WIDE_INT) 1
+	  && (mask == ((unsigned HOST_WIDE_INT) 1
 		       << (GET_MODE_BITSIZE (GET_MODE (x)) - 1))))
 	return force_to_mode (XEXP (x, 0), mode, mask, reg, next_select);
 
@@ -7367,7 +7372,7 @@ simplify_and_const_int (x, mode, varop, 
   else
     {
       if (GET_CODE (XEXP (x, 1)) != CONST_INT
-	  || INTVAL (XEXP (x, 1)) != constop)
+	  || (unsigned HOST_WIDE_INT) INTVAL (XEXP (x, 1)) != constop)
 	SUBST (XEXP (x, 1), GEN_INT (constop));
 
       SUBST (XEXP (x, 0), varop);
@@ -8273,7 +8278,8 @@ merge_outer_ops (pop0, pconst0, op1, con
     op0 = NIL;
   else if (const0 == 0 && op0 == AND)
     op0 = SET;
-  else if (const0 == GET_MODE_MASK (mode) && op0 == AND)
+  else if ((unsigned HOST_WIDE_INT) const0 == GET_MODE_MASK (mode)
+	   && op0 == AND)
     op0 = NIL;
 
   /* If this would be an entire word for the target, but is not for
@@ -9534,7 +9540,7 @@ simplify_comparison (code, pop0, pop1)
 	    for (tmode = GET_CLASS_NARROWEST_MODE
 		 (GET_MODE_CLASS (GET_MODE (op0)));
 		 tmode != GET_MODE (op0); tmode = GET_MODE_WIDER_MODE (tmode))
-	      if (c0 == GET_MODE_MASK (tmode))
+	      if ((unsigned HOST_WIDE_INT) c0 == GET_MODE_MASK (tmode))
 		{
 		  op0 = gen_lowpart_for_combine (tmode, inner_op0);
 		  op1 = gen_lowpart_for_combine (tmode, inner_op1);
@@ -9609,7 +9615,7 @@ simplify_comparison (code, pop0, pop1)
 	      || code == LT || code == LTU)
 	  && mode_width <= HOST_BITS_PER_WIDE_INT
 	  && exact_log2 (const_op) >= 0
-	  && nonzero_bits (op0, mode) == const_op)
+	  && nonzero_bits (op0, mode) == (unsigned HOST_WIDE_INT) const_op)
 	{
 	  code = (code == EQ || code == GE || code == GEU ? NE : EQ);
 	  op1 = const0_rtx, const_op = 0;
@@ -9938,7 +9944,7 @@ simplify_comparison (code, pop0, pop1)
 	      && (GET_MODE_BITSIZE (GET_MODE (XEXP (op0, 0)))
 		  <= HOST_BITS_PER_WIDE_INT)
 	      && ((unsigned HOST_WIDE_INT) const_op
-		  < (((HOST_WIDE_INT) 1
+		  < (((unsigned HOST_WIDE_INT) 1
 		      << (GET_MODE_BITSIZE (GET_MODE (XEXP (op0, 0))) - 1)))))
 	    {
 	      op0 = XEXP (op0, 0);
@@ -9962,7 +9968,7 @@ simplify_comparison (code, pop0, pop1)
 	      && GET_CODE (XEXP (SUBREG_REG (op0), 1)) == CONST_INT
 	      && INTVAL (XEXP (SUBREG_REG (op0), 1)) < 0
 	      && (- INTVAL (XEXP (SUBREG_REG (op0), 1))
-		  < GET_MODE_MASK (mode) / 2)
+		  < (HOST_WIDE_INT)(GET_MODE_MASK (mode) / 2))
 	      && (unsigned HOST_WIDE_INT) const_op < GET_MODE_MASK (mode) / 2
 	      && (0 == (nonzero_bits (XEXP (SUBREG_REG (op0), 0),
 				      GET_MODE (SUBREG_REG (op0)))
@@ -10166,7 +10172,7 @@ simplify_comparison (code, pop0, pop1)
 	      && GET_CODE (XEXP (op0, 1)) == CONST_INT
 	      && mode_width <= HOST_BITS_PER_WIDE_INT
 	      && ((INTVAL (XEXP (op0, 1)) & GET_MODE_MASK (mode))
-		  == (HOST_WIDE_INT) 1 << (mode_width - 1)))
+		  == (unsigned HOST_WIDE_INT) 1 << (mode_width - 1)))
 	    {
 	      op0 = XEXP (op0, 0);
 	      code = (code == EQ ? GE : LT);
@@ -10217,8 +10223,8 @@ simplify_comparison (code, pop0, pop1)
 	      && (INTVAL (XEXP (op0, 1)) & ~ mask) == 0
 	      && 0 == (~ GET_MODE_MASK (GET_MODE (SUBREG_REG (XEXP (op0, 0))))
 		       & INTVAL (XEXP (op0, 1)))
-	      && INTVAL (XEXP (op0, 1)) != mask
-	      && (INTVAL (XEXP (op0, 1))
+	      && (unsigned HOST_WIDE_INT) INTVAL (XEXP (op0, 1)) != mask
+	      && ((unsigned HOST_WIDE_INT) INTVAL (XEXP (op0, 1))
 		  != GET_MODE_MASK (GET_MODE (SUBREG_REG (XEXP (op0, 0))))))
 		       
 	    {
@@ -11563,7 +11569,9 @@ distribute_notes (notes, from_insn, i3, 
 		    {
 		      rtx set = single_set (tem);
 		      rtx inner_dest = 0;
+#ifdef HAVE_cc0
 		      rtx cc0_setter = NULL_RTX;
+#endif
 
 		      if (set != 0)
 			for (inner_dest = SET_DEST (set);
diff -rup orig/egcs-CVS19981012/gcc/config/mips/mips.c egcs-CVS19981012/gcc/config/mips/mips.c
--- orig/egcs-CVS19981012/gcc/config/mips/mips.c	Mon Oct 12 21:07:29 1998
+++ egcs-CVS19981012/gcc/config/mips/mips.c	Tue Oct 13 12:17:45 1998
@@ -2682,7 +2682,7 @@ gen_int_relational (test_code, result, c
 	      && p_info->const_add != 0
 	      && ((p_info->unsignedp
 		   ? ((unsigned HOST_WIDE_INT) (value + p_info->const_add)
-		      > INTVAL (cmp1))
+		      > (unsigned HOST_WIDE_INT) INTVAL (cmp1))
 		   : (value + p_info->const_add) > INTVAL (cmp1))
 		  != (p_info->const_add > 0))))
 	cmp1 = force_reg (mode, cmp1);
@@ -2710,7 +2710,8 @@ gen_int_relational (test_code, result, c
 	     we would get the wrong answer if we follow the usual path;
 	     thus, x > 0xffffffffU would turn into x > 0U.  */
 	  if ((p_info->unsignedp
-	       ? (unsigned HOST_WIDE_INT) new > INTVAL (cmp1)
+	       ? (unsigned HOST_WIDE_INT) new >
+	       (unsigned HOST_WIDE_INT) INTVAL (cmp1)
 	       : new > INTVAL (cmp1))
 	      != (p_info->const_add > 0))
 	    {
@@ -3230,7 +3231,7 @@ output_block_move (insn, operands, num_r
      the number of registers available.  */
   for (i = 4;
        i < last_operand
-       && safe_regs < (sizeof(xoperands) / sizeof(xoperands[0]));
+       && safe_regs < (int)(sizeof(xoperands) / sizeof(xoperands[0]));
        i++)
     if (! reg_mentioned_p (operands[i], operands[0])
 	&& ! reg_mentioned_p (operands[i], operands[1]))
@@ -3326,7 +3327,7 @@ output_block_move (insn, operands, num_r
 	}
     }
 
-  if (num_regs > sizeof (load_store) / sizeof (load_store[0]))
+  if (num_regs > (int)(sizeof (load_store) / sizeof (load_store[0])))
     num_regs = sizeof (load_store) / sizeof (load_store[0]);
 
   else if (num_regs < 1)
@@ -3749,7 +3750,7 @@ function_arg (cum, mode, type, named)
 
       /* Drops through.  */
     case BLKmode:
-      if (type != (tree)0 && TYPE_ALIGN (type) > BITS_PER_WORD
+      if (type != (tree)0 && TYPE_ALIGN (type) > (unsigned) BITS_PER_WORD
 	  && ! TARGET_64BIT && mips_abi != ABI_EABI)
 	cum->arg_words += (cum->arg_words & 1);
       regbase = GP_ARG_FIRST;
@@ -5764,7 +5765,7 @@ save_restore_insns (store_p, large_reg, 
 	  else
 	    {
 	      fprintf (file, "\tli\t%s,0x%.08lx\t# ",
-		       reg_names[MIPS_TEMP2_REGNUM], base_offset);
+		       reg_names[MIPS_TEMP2_REGNUM], (long) base_offset);
 	      fprintf (file, HOST_WIDE_INT_PRINT_DEC, base_offset);
 	      fprintf (file, "\n\t%s\t%s,%s,%s\n",
 		       Pmode == DImode ? "daddu" : "addu",
@@ -5981,7 +5982,7 @@ save_restore_insns (store_p, large_reg, 
 	  else
 	    {
 	      fprintf (file, "\tli\t%s,0x%.08lx\t# ",
-		       reg_names[MIPS_TEMP2_REGNUM], base_offset);
+		       reg_names[MIPS_TEMP2_REGNUM], (long) base_offset);
 	      fprintf (file, HOST_WIDE_INT_PRINT_DEC, base_offset);
 	      fprintf (file, "\n\t%s\t%s,%s,%s\n",
 		       Pmode == DImode ? "daddu" : "addu",
diff -rup orig/egcs-CVS19981012/gcc/config/mips/mips.h egcs-CVS19981012/gcc/config/mips/mips.h
--- orig/egcs-CVS19981012/gcc/config/mips/mips.h	Tue Oct 13 17:37:25 1998
+++ egcs-CVS19981012/gcc/config/mips/mips.h	Tue Oct 13 09:49:43 1998
@@ -3183,7 +3183,7 @@ while (0)
    between pointers and any other objects of this machine mode.  */
 
 #ifndef Pmode
-#define Pmode (TARGET_LONG64 ? DImode : SImode)
+#define Pmode ((enum machine_mode)(TARGET_LONG64 ? DImode : SImode))
 #endif
 
 /* A function address in a call instruction
diff -rup orig/egcs-CVS19981012/gcc/flow.c egcs-CVS19981012/gcc/flow.c
--- orig/egcs-CVS19981012/gcc/flow.c	Mon Oct 12 21:08:33 1998
+++ egcs-CVS19981012/gcc/flow.c	Tue Oct 13 10:21:13 1998
@@ -1366,7 +1366,6 @@ life_analysis_1 (f, nregs)
      possibly excluding those that are used after they are set.  */
   regset *basic_block_significant;
   register int i;
-  rtx insn;
 
   struct obstack flow_obstack;
 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]