aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJohn David Anglin <dave@hiauly1.hia.nrc.ca>2001-03-02 23:15:32 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2001-03-02 23:15:32 +0000
commitdc76f41ca633e9094e1c2d43b58bbab69a10f973 (patch)
tree4e3117bf6a63f39a9721402d420e6803a6812a16 /gcc
parent4d2cf7156f52f377023a842613d13d8271607aa0 (diff)
downloadgcc-dc76f41ca633e9094e1c2d43b58bbab69a10f973.zip
gcc-dc76f41ca633e9094e1c2d43b58bbab69a10f973.tar.gz
gcc-dc76f41ca633e9094e1c2d43b58bbab69a10f973.tar.bz2
* cselib.c (hash_rtx): Cast enums to unsigned int.
From-SVN: r40196
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/cselib.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f64188d..c71cd60 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
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.
* c-decl.c (grokdeclarator): Cast enums to int for comparison and
shifts.
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 606eb97..0dbc3ab 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -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