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]
Other format: [Raw text]

[patch] Fix warnings related to GET_MODE_{BITSIZE|SIZE}.


Hi,

Attached is a patch to fix warnings related to
GET_MODE_{BITSIZE|SIZE}.

Until now, GET_MODE_{BITSIZE|SIZE} were of unsigned short to suppress
warnings.  The most natural type would probably be unsigned int, and
we should fix resulting warnings.

Tested on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2003-12-14  Kazu Hirata  <kazu@cs.umass.edu>

	* cfgloopanal.c: Fix warnings.
	* combine.c: Likewise.
	* cse.c: Likewise.
	* emit-rtl.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* optabs.c: Likewise.
	* reload.c: Likewise.
	* value-prof.c: Likewise.
	* config/i386/i386.md: Likewise.
	* machmode.h (GET_MODE_SIZE): Make the return type unsigned int.
	(GET_MODE_BITSIZE): Likewise.
	* real.c (significand_size): Likewise.
	* real.h: Update the prototype of significand_size.

2003-12-14  Kazu Hirata  <kazu@cs.umass.edu>

	* misc.c: Fix warnings.

Index: cfgloopanal.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgloopanal.c,v
retrieving revision 1.16
diff -u -r1.16 cfgloopanal.c
--- cfgloopanal.c	11 Dec 2003 00:20:36 -0000	1.16
+++ cfgloopanal.c	14 Dec 2003 21:37:03 -0000
@@ -681,7 +681,7 @@
 fits_in_mode_p (enum machine_mode mode, rtx expr)
 {
   unsigned HOST_WIDEST_INT val;
-  int n_bits = 0;
+  unsigned int n_bits = 0;
 
   if (GET_CODE (expr) == CONST_INT)
     {
Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.397
diff -u -r1.397 combine.c
--- combine.c	11 Dec 2003 00:20:37 -0000	1.397
+++ combine.c	14 Dec 2003 21:37:12 -0000
@@ -2979,8 +2979,8 @@
 	  && GET_CODE (XEXP (SET_DEST (x), 1)) == CONST_INT
 	  && GET_CODE (XEXP (SET_DEST (x), 2)) == CONST_INT
 	  && GET_CODE (SET_SRC (x)) == CONST_INT
-	  && ((INTVAL (XEXP (SET_DEST (x), 1))
-	       + INTVAL (XEXP (SET_DEST (x), 2)))
+	  && ((unsigned int) (INTVAL (XEXP (SET_DEST (x), 1))
+			      + INTVAL (XEXP (SET_DEST (x), 2)))
 	      <= GET_MODE_BITSIZE (GET_MODE (XEXP (SET_DEST (x), 0))))
 	  && ! side_effects_p (XEXP (SET_DEST (x), 0)))
 	{
@@ -3895,7 +3895,8 @@
 
       if (GET_CODE (temp) == ASHIFTRT
 	  && GET_CODE (XEXP (temp, 1)) == CONST_INT
-	  && INTVAL (XEXP (temp, 1)) == GET_MODE_BITSIZE (mode) - 1)
+	  && ((unsigned int) INTVAL (XEXP (temp, 1))
+	      == GET_MODE_BITSIZE (mode) - 1))
 	return simplify_shift_const (temp, LSHIFTRT, mode, XEXP (temp, 0),
 				     INTVAL (XEXP (temp, 1)));
 
@@ -4025,7 +4026,7 @@
       /*  (float_truncate (float x)) is (float x)  */
       if (GET_CODE (XEXP (x, 0)) == FLOAT
 	  && (flag_unsafe_math_optimizations
-	      || ((unsigned)significand_size (GET_MODE (XEXP (x, 0)))
+	      || (significand_size (GET_MODE (XEXP (x, 0)))
 		  >= (GET_MODE_BITSIZE (GET_MODE (XEXP (XEXP (x, 0), 0)))
 		      - num_sign_bit_copies (XEXP (XEXP (x, 0), 0),
 					     GET_MODE (XEXP (XEXP (x, 0), 0)))))))
@@ -4057,7 +4058,7 @@
           */
       if (GET_CODE (XEXP (x, 0)) == FLOAT_EXTEND
 	  || (GET_CODE (XEXP (x, 0)) == FLOAT
-	      && ((unsigned)significand_size (GET_MODE (XEXP (x, 0)))
+	      && (significand_size (GET_MODE (XEXP (x, 0)))
 		  >= (GET_MODE_BITSIZE (GET_MODE (XEXP (XEXP (x, 0), 0)))
 		      - num_sign_bit_copies (XEXP (XEXP (x, 0), 0),
 					     GET_MODE (XEXP (XEXP (x, 0), 0)))))))
@@ -5440,7 +5441,7 @@
 	  && rtx_equal_p (XEXP (op0, 0), XEXP (op1, 0))
 	  && GET_CODE (XEXP (op0, 1)) == CONST_INT
 	  && GET_CODE (XEXP (op1, 1)) == CONST_INT
-	  && (INTVAL (XEXP (op0, 1)) + INTVAL (XEXP (op1, 1))
+	  && ((unsigned int) (INTVAL (XEXP (op0, 1)) + INTVAL (XEXP (op1, 1)))
 	      == GET_MODE_BITSIZE (mode)))
 	return gen_rtx_ROTATE (mode, XEXP (op0, 0),
 			       (GET_CODE (op0) == ASHIFT
@@ -5537,7 +5538,8 @@
 	  && op1 == const1_rtx
 	  && GET_CODE (op0) == LSHIFTRT
 	  && GET_CODE (XEXP (op0, 1)) == CONST_INT
-	  && INTVAL (XEXP (op0, 1)) == GET_MODE_BITSIZE (mode) - 1)
+	  && ((unsigned int) INTVAL (XEXP (op0, 1))
+	      == GET_MODE_BITSIZE (mode) - 1))
 	return gen_rtx_GE (mode, XEXP (op0, 0), const0_rtx);
 
       /* (xor (comparison foo bar) (const_int sign-bit))
@@ -5810,7 +5812,8 @@
 	  /* If the position is constant and spans the width of INNER,
 	     surround INNER  with a USE to indicate this.  */
 	  if (GET_CODE (pos) == CONST_INT
-	      && INTVAL (pos) + len > GET_MODE_BITSIZE (GET_MODE (inner)))
+	      && ((unsigned int) (INTVAL (pos) + len)
+		  > GET_MODE_BITSIZE (GET_MODE (inner))))
 	    inner = gen_rtx_USE (GET_MODE (SET_DEST (x)), inner);
 
 	  if (BITS_BIG_ENDIAN)
@@ -5820,7 +5823,7 @@
 			       - INTVAL (pos));
 	      else if (GET_CODE (pos) == MINUS
 		       && GET_CODE (XEXP (pos, 1)) == CONST_INT
-		       && (INTVAL (XEXP (pos, 1))
+		       && ((unsigned int) INTVAL (XEXP (pos, 1))
 			   == GET_MODE_BITSIZE (GET_MODE (inner)) - len))
 		/* If position is ADJUST - X, new position is X.  */
 		pos = XEXP (pos, 0);
@@ -6047,7 +6050,7 @@
 		{
 		  /* We can't call gen_lowpart_for_combine here since we always want
 		     a SUBREG and it would sometimes return a new hard register.  */
-		  HOST_WIDE_INT final_word = pos / BITS_PER_WORD;
+		  unsigned HOST_WIDE_INT final_word = pos / BITS_PER_WORD;
 
 		  if (WORDS_BIG_ENDIAN
 		      && GET_MODE_SIZE (inner_mode) > UNITS_PER_WORD)
@@ -6931,8 +6934,8 @@
 	  && INTVAL (XEXP (XEXP (x, 0), 1)) >= 0
 	  && INTVAL (XEXP (XEXP (x, 0), 1)) < HOST_BITS_PER_WIDE_INT
 	  && GET_CODE (XEXP (x, 1)) == CONST_INT
-	  && ((INTVAL (XEXP (XEXP (x, 0), 1))
-	       + floor_log2 (INTVAL (XEXP (x, 1))))
+	  && (((unsigned int) (INTVAL (XEXP (XEXP (x, 0), 1))
+			       + floor_log2 (INTVAL (XEXP (x, 1)))))
 	      < GET_MODE_BITSIZE (GET_MODE (x)))
 	  && (INTVAL (XEXP (x, 1))
 	      & ~nonzero_bits (XEXP (x, 0), GET_MODE (x))) == 0)
@@ -6970,7 +6973,7 @@
 
       if (! (GET_CODE (XEXP (x, 1)) == CONST_INT
 	     && INTVAL (XEXP (x, 1)) >= 0
-	     && INTVAL (XEXP (x, 1)) < GET_MODE_BITSIZE (mode))
+	     && (unsigned int) INTVAL (XEXP (x, 1)) < GET_MODE_BITSIZE (mode))
 	  && ! (GET_MODE (XEXP (x, 1)) != VOIDmode
 		&& (nonzero_bits (XEXP (x, 1), GET_MODE (XEXP (x, 1)))
 		    < (unsigned HOST_WIDE_INT) GET_MODE_BITSIZE (mode))))
@@ -6981,7 +6984,7 @@
 	 conservative form of the mask.  */
       if (GET_CODE (XEXP (x, 1)) == CONST_INT
 	  && INTVAL (XEXP (x, 1)) >= 0
-	  && INTVAL (XEXP (x, 1)) < GET_MODE_BITSIZE (op_mode)
+	  && (unsigned int) INTVAL (XEXP (x, 1)) < GET_MODE_BITSIZE (op_mode)
 	  && GET_MODE_BITSIZE (op_mode) <= HOST_BITS_PER_WIDE_INT)
 	mask >>= INTVAL (XEXP (x, 1));
       else
@@ -7037,7 +7040,7 @@
 	  && exact_log2 (mask + 1) >= 0
 	  /* Number of bits left after the shift must be more than the mask
 	     needs.  */
-	  && ((INTVAL (XEXP (x, 1)) + exact_log2 (mask + 1))
+	  && (((unsigned int) INTVAL (XEXP (x, 1)) + exact_log2 (mask + 1))
 	      <= GET_MODE_BITSIZE (GET_MODE (x)))
 	  /* Must be more sign bit copies than the mask needs.  */
 	  && ((int) num_sign_bit_copies (XEXP (x, 0), GET_MODE (XEXP (x, 0)))
@@ -7099,7 +7102,7 @@
 	      x = simplify_shift_const
 		(x, LSHIFTRT, GET_MODE (x), XEXP (x, 0),
 		 i < 0 ? INTVAL (XEXP (x, 1))
-		 : GET_MODE_BITSIZE (GET_MODE (x)) - 1 - i);
+		 : (int) GET_MODE_BITSIZE (GET_MODE (x)) - 1 - i);
 
 	      if (GET_CODE (x) != ASHIFTRT)
 		return force_to_mode (x, mode, mask, reg, next_select);
@@ -7120,7 +7123,7 @@
       if ((GET_CODE (x) == LSHIFTRT || GET_CODE (x) == ASHIFTRT)
 	  && GET_CODE (XEXP (x, 1)) == CONST_INT
 	  && INTVAL (XEXP (x, 1)) >= 0
-	  && (INTVAL (XEXP (x, 1))
+	  && ((unsigned int) INTVAL (XEXP (x, 1))
 	      <= GET_MODE_BITSIZE (GET_MODE (x)) - (floor_log2 (mask) + 1))
 	  && GET_CODE (XEXP (x, 0)) == ASHIFT
 	  && XEXP (XEXP (x, 0), 1) == XEXP (x, 1))
@@ -7168,7 +7171,8 @@
       if (GET_CODE (XEXP (x, 0)) == LSHIFTRT
 	  && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT
 	  && INTVAL (XEXP (XEXP (x, 0), 1)) >= 0
-	  && (INTVAL (XEXP (XEXP (x, 0), 1)) + floor_log2 (mask)
+	  && ((unsigned int) (INTVAL (XEXP (XEXP (x, 0), 1))
+			      + floor_log2 (mask))
 	      < GET_MODE_BITSIZE (GET_MODE (x)))
 	  && INTVAL (XEXP (XEXP (x, 0), 1)) < HOST_BITS_PER_WIDE_INT)
 	{
@@ -9361,7 +9365,8 @@
 	     AND of a new shift with a mask.  We compute the result below.  */
 	  if (GET_CODE (XEXP (varop, 1)) == CONST_INT
 	      && INTVAL (XEXP (varop, 1)) >= 0
-	      && INTVAL (XEXP (varop, 1)) < GET_MODE_BITSIZE (GET_MODE (varop))
+	      && ((unsigned int) INTVAL (XEXP (varop, 1))
+		  < GET_MODE_BITSIZE (GET_MODE (varop)))
 	      && GET_MODE_BITSIZE (result_mode) <= HOST_BITS_PER_WIDE_INT
 	      && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT)
 	    {
@@ -9727,7 +9732,7 @@
 	  if (code == LSHIFTRT
 	      && GET_CODE (XEXP (varop, 0)) == LSHIFTRT
 	      && GET_CODE (XEXP (XEXP (varop, 0), 1)) == CONST_INT
-	      && (INTVAL (XEXP (XEXP (varop, 0), 1))
+	      && ((unsigned int) INTVAL (XEXP (XEXP (varop, 0), 1))
 		  >= (GET_MODE_BITSIZE (GET_MODE (XEXP (varop, 0)))
 		      - GET_MODE_BITSIZE (GET_MODE (varop)))))
 	    {
@@ -10158,7 +10163,7 @@
 	  && XEXP (op0, 1) == XEXP (op1, 1)
 	  && XEXP (op0, 1) == XEXP (XEXP (op0, 0), 1)
 	  && XEXP (op0, 1) == XEXP (XEXP (op1, 0), 1)
-	  && (INTVAL (XEXP (op0, 1))
+	  && ((unsigned int) INTVAL (XEXP (op0, 1))
 	      == (GET_MODE_BITSIZE (GET_MODE (op0))
 		  - (GET_MODE_BITSIZE
 		     (GET_MODE (SUBREG_REG (XEXP (XEXP (op0, 0), 0))))))))
Index: cse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cse.c,v
retrieving revision 1.277
diff -u -r1.277 cse.c
--- cse.c	3 Dec 2003 11:09:55 -0000	1.277
+++ cse.c	14 Dec 2003 21:37:18 -0000
@@ -3438,9 +3438,11 @@
 		  if (op0 && op1
 		      && GET_CODE (elt->exp) == ASHIFT
 		      && GET_CODE (op1) == CONST_INT
-		      && INTVAL (op1) >= GET_MODE_BITSIZE (mode))
+		      && ((unsigned int) INTVAL (op1)
+			  >= GET_MODE_BITSIZE (mode)))
 		    {
-		      if (INTVAL (op1) < GET_MODE_BITSIZE (GET_MODE (elt->exp)))
+		      if ((unsigned int) INTVAL (op1)
+			  < GET_MODE_BITSIZE (GET_MODE (elt->exp)))
 
 			/* If the count fits in the inner mode's width,
 			   but exceeds the outer mode's width,
@@ -3575,8 +3577,9 @@
 		rtx table = PATTERN (table_insn);
 
 		if (offset >= 0
-		    && (offset / GET_MODE_SIZE (GET_MODE (table))
-			< XVECLEN (table, 0)))
+		    && (((unsigned int) offset
+			 / GET_MODE_SIZE (GET_MODE (table)))
+			< (unsigned int) XVECLEN (table, 0)))
 		  return XVECEXP (table, 0,
 				  offset / GET_MODE_SIZE (GET_MODE (table)));
 	      }
@@ -3586,8 +3589,9 @@
 		rtx table = PATTERN (table_insn);
 
 		if (offset >= 0
-		    && (offset / GET_MODE_SIZE (GET_MODE (table))
-			< XVECLEN (table, 1)))
+		    && (((unsigned int) offset
+			 / GET_MODE_SIZE (GET_MODE (table)))
+			< (unsigned int) XVECLEN (table, 1)))
 		  {
 		    offset /= GET_MODE_SIZE (GET_MODE (table));
 		    new = gen_rtx_MINUS (Pmode, XVECEXP (table, 1, offset),
@@ -4186,7 +4190,8 @@
 		 of shifts.  */
 
 	      if (is_shift && GET_CODE (new_const) == CONST_INT
-		  && INTVAL (new_const) >= GET_MODE_BITSIZE (mode))
+		  && ((unsigned int) INTVAL (new_const)
+		      >= GET_MODE_BITSIZE (mode)))
 		{
 		  /* As an exception, we can turn an ASHIFTRT of this
 		     form into a shift of the number of bits - 1.  */
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.358
diff -u -r1.358 emit-rtl.c
--- emit-rtl.c	13 Dec 2003 04:11:19 -0000	1.358
+++ emit-rtl.c	14 Dec 2003 21:37:22 -0000
@@ -300,7 +300,8 @@
      field is not present.  */
   if (alias == 0 && expr == 0 && offset == 0
       && (size == 0
-	  || (mode != BLKmode && GET_MODE_SIZE (mode) == INTVAL (size)))
+	  || (mode != BLKmode
+	      && GET_MODE_SIZE (mode) == (unsigned int) INTVAL (size)))
       && (STRICT_ALIGNMENT && mode != BLKmode
 	  ? align == GET_MODE_ALIGNMENT (mode) : align == BITS_PER_UNIT))
     return 0;
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.607
diff -u -r1.607 expr.c
--- expr.c	13 Dec 2003 04:11:20 -0000	1.607
+++ expr.c	14 Dec 2003 21:37:29 -0000
@@ -2081,7 +2081,8 @@
 	{
 	  if (bytepos + bytelen <= GET_MODE_SIZE (GET_MODE (XEXP (dst, 0))))
 	    dest = XEXP (dst, 0);
-	  else if (bytepos >= GET_MODE_SIZE (GET_MODE (XEXP (dst, 0))))
+	  else if ((unsigned int) bytepos
+		   >= GET_MODE_SIZE (GET_MODE (XEXP (dst, 0))))
 	    {
 	      bytepos -= GET_MODE_SIZE (GET_MODE (XEXP (dst, 0)));
 	      dest = XEXP (dst, 1);
@@ -3102,7 +3103,7 @@
       rtx last_insn = 0;
       rtx seq, inner;
       int need_clobber;
-      int i;
+      unsigned int i;
 
 #ifdef PUSH_ROUNDING
 
@@ -7193,7 +7194,8 @@
 	   one element arrays having the same mode as its element.  */
 	if (GET_CODE (op0) == CONCAT)
 	  {
-	    if (bitpos != 0 || bitsize != GET_MODE_BITSIZE (GET_MODE (op0)))
+	    if (bitpos != 0
+		|| (unsigned int) bitsize != GET_MODE_BITSIZE (GET_MODE (op0)))
 	      abort ();
 	    return op0;
 	  }
Index: fold-const.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v
retrieving revision 1.317
diff -u -r1.317 fold-const.c
--- fold-const.c	24 Nov 2003 00:50:31 -0000	1.317
+++ fold-const.c	14 Dec 2003 21:37:34 -0000
@@ -2675,8 +2675,8 @@
      then will no longer be able to replace it.  */
   linner = get_inner_reference (lhs, &lbitsize, &lbitpos, &offset, &lmode,
 				&lunsignedp, &lvolatilep);
-  if (linner == lhs || lbitsize == GET_MODE_BITSIZE (lmode) || lbitsize < 0
-      || offset != 0 || TREE_CODE (linner) == PLACEHOLDER_EXPR)
+  if (linner == lhs || (unsigned int) lbitsize == GET_MODE_BITSIZE (lmode)
+      || lbitsize < 0 || offset != 0 || TREE_CODE (linner) == PLACEHOLDER_EXPR)
     return 0;
 
  if (!const_p)
Index: machmode.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/machmode.h,v
retrieving revision 1.38
diff -u -r1.38 machmode.h
--- machmode.h	6 Nov 2003 08:38:50 -0000	1.38
+++ machmode.h	14 Dec 2003 21:37:34 -0000
@@ -79,8 +79,8 @@
 /* Get the size in bytes and bits of an object of mode MODE.  */
 
 extern CONST_MODE_SIZE unsigned char mode_size[NUM_MACHINE_MODES];
-#define GET_MODE_SIZE(MODE)    ((unsigned short) mode_size[MODE])
-#define GET_MODE_BITSIZE(MODE) ((unsigned short) (GET_MODE_SIZE (MODE) * BITS_PER_UNIT))
+#define GET_MODE_SIZE(MODE)    ((unsigned int) mode_size[MODE])
+#define GET_MODE_BITSIZE(MODE) ((unsigned int) (GET_MODE_SIZE (MODE) * BITS_PER_UNIT))
 
 /* Get the number of value bits of an object of mode MODE.  */
 extern const unsigned short mode_precision[NUM_MACHINE_MODES];
Index: optabs.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/optabs.c,v
retrieving revision 1.203
diff -u -r1.203 optabs.c
--- optabs.c	21 Nov 2003 06:52:23 -0000	1.203
+++ optabs.c	14 Dec 2003 21:37:37 -0000
@@ -907,7 +907,7 @@
       && GET_MODE_SIZE (mode) > UNITS_PER_WORD
       && binoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
     {
-      int i;
+      unsigned int i;
       rtx insns;
       rtx equiv_value;
 
@@ -1917,7 +1917,8 @@
 
       /* If METHODS is OPTAB_DIRECT, we don't insist on the exact mode,
 	 but that we operate on more than one element at a time.  */
-      if (subsize == GET_MODE_UNIT_SIZE (mode) && methods == OPTAB_DIRECT)
+      if ((unsigned int) subsize == GET_MODE_UNIT_SIZE (mode)
+	  && methods == OPTAB_DIRECT)
 	return 0;
 
       start_sequence ();
@@ -2499,7 +2500,7 @@
       && GET_MODE_SIZE (mode) > UNITS_PER_WORD
       && unoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
     {
-      int i;
+      unsigned int i;
       rtx insns;
 
       if (target == 0 || target == op0)
Index: real.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/real.c,v
retrieving revision 1.133
diff -u -r1.133 real.c
--- real.c	3 Nov 2003 23:27:51 -0000	1.133
+++ real.c	14 Dec 2003 21:37:39 -0000
@@ -2467,7 +2467,7 @@
 /* Return the number of bits in the significand for MODE.  */
 /* ??? Legacy.  Should get access to real_format directly.  */
 
-int
+unsigned int
 significand_size (enum machine_mode mode)
 {
   const struct real_format *fmt;
Index: real.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/real.h,v
retrieving revision 1.75
diff -u -r1.75 real.h
--- real.h	10 Oct 2003 20:33:05 -0000	1.75
+++ real.h	14 Dec 2003 21:37:39 -0000
@@ -297,7 +297,7 @@
 #define REAL_VALUE_ABS(X) \
   real_arithmetic2 (ABS_EXPR, &(X), NULL)
 
-extern int significand_size (enum machine_mode);
+extern unsigned int significand_size (enum machine_mode);
 
 extern REAL_VALUE_TYPE real_from_string2 (const char *, enum machine_mode);
 
Index: reload.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload.c,v
retrieving revision 1.227
diff -u -r1.227 reload.c
--- reload.c	4 Dec 2003 09:11:17 -0000	1.227
+++ reload.c	14 Dec 2003 21:37:44 -0000
@@ -814,7 +814,7 @@
 	  && output
 	  && GET_MODE_SIZE (GET_MODE (inner)) > UNITS_PER_WORD
 	  && ((GET_MODE_SIZE (GET_MODE (inner)) / UNITS_PER_WORD)
-	      != (int) HARD_REGNO_NREGS (REGNO (inner), GET_MODE (inner))));
+	      != HARD_REGNO_NREGS (REGNO (inner), GET_MODE (inner))));
 }
 
 /* Return nonzero if IN can be reloaded into REGNO with mode MODE without
@@ -1034,8 +1034,8 @@
 		       > UNITS_PER_WORD)
 		   && ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (in)))
 			/ UNITS_PER_WORD)
-		       != (int) HARD_REGNO_NREGS (REGNO (SUBREG_REG (in)),
-						  GET_MODE (SUBREG_REG (in)))))
+		       != HARD_REGNO_NREGS (REGNO (SUBREG_REG (in)),
+					    GET_MODE (SUBREG_REG (in)))))
 		  || ! HARD_REGNO_MODE_OK (subreg_regno (in), inmode)))
 #ifdef SECONDARY_INPUT_RELOAD_CLASS
 	  || (SECONDARY_INPUT_RELOAD_CLASS (class, inmode, in) != NO_REGS
@@ -1131,8 +1131,8 @@
 		       > UNITS_PER_WORD)
 		   && ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (out)))
 			/ UNITS_PER_WORD)
-		       != (int) HARD_REGNO_NREGS (REGNO (SUBREG_REG (out)),
-						  GET_MODE (SUBREG_REG (out)))))
+		       != HARD_REGNO_NREGS (REGNO (SUBREG_REG (out)),
+					    GET_MODE (SUBREG_REG (out)))))
 		  || ! HARD_REGNO_MODE_OK (subreg_regno (out), outmode)))
 #ifdef SECONDARY_OUTPUT_RELOAD_CLASS
 	  || (SECONDARY_OUTPUT_RELOAD_CLASS (class, outmode, out) != NO_REGS
Index: value-prof.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/value-prof.c,v
retrieving revision 1.7
diff -u -r1.7 value-prof.c
--- value-prof.c	21 Nov 2003 06:52:23 -0000	1.7
+++ value-prof.c	14 Dec 2003 21:37:45 -0000
@@ -522,7 +522,7 @@
   enum machine_mode mode;
   gcov_type wrong_values, count;
   edge e;
-  int i;
+  unsigned int i;
 
   set = single_set (insn);
   if (!set)
Index: ada/misc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/misc.c,v
retrieving revision 1.72
diff -u -r1.72 misc.c
--- ada/misc.c	14 Nov 2003 16:49:19 -0000	1.72
+++ ada/misc.c	14 Dec 2003 21:38:49 -0000
@@ -991,7 +991,7 @@
 
   for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); mode != VOIDmode;
        mode = GET_MODE_WIDER_MODE (mode))
-    if (GET_MODE_BITSIZE (mode) == size)
+    if (GET_MODE_BITSIZE (mode) == (unsigned int) size)
       return GET_MODE_PRECISION (mode);
 
   abort ();
Index: config/i386/i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.494
diff -u -r1.494 i386.md
--- config/i386/i386.md	13 Dec 2003 04:44:05 -0000	1.494
+++ config/i386/i386.md	14 Dec 2003 21:38:58 -0000
@@ -7864,7 +7864,7 @@
   else if (GET_CODE (operands[0]) == SUBREG
 	   && (submode = GET_MODE (SUBREG_REG (operands[0])),
 	       GET_MODE_BITSIZE (mode) > GET_MODE_BITSIZE (submode))
-	   && pos + len <= GET_MODE_BITSIZE (submode))
+	   && (unsigned int) (pos + len) <= GET_MODE_BITSIZE (submode))
     {
       /* Narrow a paradoxical subreg to prevent partial register stalls.  */
       mode = submode;


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