* cselib.c (hash_rtx): Cast enums to unsigned int.
authorJohn David Anglin <dave@hiauly1.hia.nrc.ca>
Fri, 2 Mar 2001 23:15:32 +0000 (23:15 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 2 Mar 2001 23:15:32 +0000 (23:15 +0000)
From-SVN: r40196

gcc/ChangeLog
gcc/cselib.c

index f64188df294204d983d3548218370088f72dc05d..c71cd60e372b907f49fec09bed634930b0e6afce 100644 (file)
@@ -1,3 +1,7 @@
+2001-03-02  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * cselib.c (hash_rtx): Cast enums to unsigned int.
+
 2001-03-02  John David Anglin  <dave@hiauly1.hia.nrc.ca>
 
        * print-rtl.c (print_rtx): Cast enums to int for comparison.
index 606eb972a5709299f093fd06112dbcdbf6bcd8f7..0dbc3ab618a288893814d35238136f2fcbfc39d6 100644 (file)
@@ -584,7 +584,7 @@ hash_rtx (x, mode, create)
 
     case CONST_INT:
       hash += ((unsigned) CONST_INT << 7) + (unsigned) mode + INTVAL (x);
-      return hash ? hash : CONST_INT;
+      return hash ? hash : (unsigned int) CONST_INT;
 
     case CONST_DOUBLE:
       /* This is like the general case, except that it only counts
@@ -596,18 +596,18 @@ hash_rtx (x, mode, create)
       else
        hash += ((unsigned) CONST_DOUBLE_LOW (x)
                 + (unsigned) CONST_DOUBLE_HIGH (x));
-      return hash ? hash : CONST_DOUBLE;
+      return hash ? hash : (unsigned int) CONST_DOUBLE;
 
       /* Assume there is only one rtx object for any given label.  */
     case LABEL_REF:
       hash
        += ((unsigned) LABEL_REF << 7) + (unsigned long) XEXP (x, 0);
-      return hash ? hash : LABEL_REF;
+      return hash ? hash : (unsigned int) LABEL_REF;
 
     case SYMBOL_REF:
       hash
        += ((unsigned) SYMBOL_REF << 7) + (unsigned long) XSTR (x, 0);
-      return hash ? hash : SYMBOL_REF;
+      return hash ? hash : (unsigned int) SYMBOL_REF;
 
     case PRE_DEC:
     case PRE_INC:
@@ -681,7 +681,7 @@ hash_rtx (x, mode, create)
        abort ();
     }
 
-  return hash ? hash : 1 + GET_CODE (x);
+  return hash ? hash : 1 + (unsigned int) GET_CODE (x);
 }
 
 /* Create a new value structure for VALUE and initialize it.  The mode of the