From: Nathan Sidwell Date: Wed, 22 Dec 2004 22:06:35 +0000 (+0000) Subject: system.h (IN_RANGE): Restore HOST_WIDE_INT cast. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=938802033e97eb1c384ddabf8f9f2065632d02a4;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 11c98e3b37a..aba1f60cd05 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-12-22 Nathan Sidwell + + * 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 Uros Bizjak diff --git a/gcc/system.h b/gcc/system.h index 0efd4142bf3..676869e12dd 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 76424a5c6b9..7a78bbf6190 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. */