OSDN Git Service

* system.h (IN_RANGE): Restore HOST_WIDE_INT cast.
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Dec 2004 22:06:35 +0000 (22:06 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Dec 2004 22:06:35 +0000 (22:06 +0000)
* tree.h (IS_EXPR_CODE_CLASS): Do not use IN_RANGE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92511 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/system.h
gcc/tree.h

index 11c98e3..aba1f60 100644 (file)
@@ -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>
 
index 0efd414..676869e 100644 (file)
@@ -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.  */
index 76424a5..7a78bbf 100644 (file)
@@ -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.  */