aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2004-12-22 22:06:35 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2004-12-22 22:06:35 +0000
commit938802033e97eb1c384ddabf8f9f2065632d02a4 (patch)
treed3c41d1fad0a4d7bc84d1e78f14516a820e2e648 /gcc
parent5e001b48afe2374f1f63b01e01fb6e308f0365ed (diff)
downloadgcc-938802033e97eb1c384ddabf8f9f2065632d02a4.zip
gcc-938802033e97eb1c384ddabf8f9f2065632d02a4.tar.gz
gcc-938802033e97eb1c384ddabf8f9f2065632d02a4.tar.bz2
system.h (IN_RANGE): Restore HOST_WIDE_INT cast.
* system.h (IN_RANGE): Restore HOST_WIDE_INT cast. * tree.h (IS_EXPR_CODE_CLASS): Do not use IN_RANGE. From-SVN: r92511
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/system.h2
-rw-r--r--gcc/tree.h2
3 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 11c98e3..aba1f60 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-12-22 Nathan Sidwell <nathan@codesourcery.com>
+
+ * system.h (IN_RANGE): Restore HOST_WIDE_INT cast.
+ * tree.h (IS_EXPR_CODE_CLASS): Do not use IN_RANGE.
+
2004-12-22 Richard Henderson <rth@redhat.com>
Uros Bizjak <uros@kss-loka.si>
diff --git a/gcc/system.h b/gcc/system.h
index 0efd414..676869e 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -179,7 +179,7 @@ extern int errno;
UPPER. However the bounds themselves can be either positive or
negative. */
#define IN_RANGE(VALUE, LOWER, UPPER) \
- ((unsigned)((VALUE) - (LOWER)) <= ((UPPER) - (LOWER)))
+ ((unsigned HOST_WIDE_INT)((VALUE) - (LOWER)) <= ((UPPER) - (LOWER)))
/* Infrastructure for defining missing _MAX and _MIN macros. Note that
macros defined with these cannot be used in #if. */
diff --git a/gcc/tree.h b/gcc/tree.h
index 76424a5..7a78bbf 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -147,7 +147,7 @@ extern const enum tree_code_class tree_code_type[];
expression. */
#define IS_EXPR_CODE_CLASS(CLASS)\
- (IN_RANGE (CLASS, tcc_reference, tcc_expression))
+ (((CLASS) - tcc_reference) <= (tcc_expression - tcc_reference))
/* Returns nonzero iff NODE is an expression of some kind. */