# HG changeset patch # User Mario de Sousa # Date 1345138103 -3600 # Node ID e3616f6b6959e38bca0b5ebe020c34a006eab909 # Parent aef32856eeb5411a540e7c7940d919b160611fbd Remove remaining signed/unsigned comparison error messages when compiling. diff -r aef32856eeb5 -r e3616f6b6959 stage3/array_range_check.cc --- a/stage3/array_range_check.cc Fri Jul 20 23:18:32 2012 +0200 +++ b/stage3/array_range_check.cc Thu Aug 16 18:28:23 2012 +0100 @@ -80,7 +80,8 @@ * first has a lesser value. */ static inline int cmp_unsigned_signed(const uint64_t u, const int64_t s) { - if (u <= INT64_MAX) + const uint64_t INT64_MAX_uvar = INT64_MAX; + if (u <= INT64_MAX_uvar) return ((int64_t)u - s); return -1; } diff -r aef32856eeb5 -r e3616f6b6959 stage3/constant_folding.cc --- a/stage3/constant_folding.cc Fri Jul 20 23:18:32 2012 +0200 +++ b/stage3/constant_folding.cc Thu Aug 16 18:28:23 2012 +0100 @@ -752,7 +752,7 @@ * However, the positive value cannot be stored inside an int64! So, in this case, we will get the value from the uint64 cvalue. */ // if (INT64_MIN == -INT64_MAX - 1) // We do not really need to check that the platform uses two's complement - if (VALID_CVALUE(uint64, symbol->exp) && (GET_CVALUE(uint64, symbol->exp) == -INT64_MIN)) { // How do we stop the compiler from complaining about a comparison between int and unsigned int? + if (VALID_CVALUE(uint64, symbol->exp) && (GET_CVALUE(uint64, symbol->exp) == (uint64_t)INT64_MAX+1)) { SET_CVALUE(int64, symbol, INT64_MIN); } return NULL;