diff options
author | 2004-07-23 22:35:40 -0700 | |
---|---|---|
committer | 2005-04-07 21:02:17 -0700 | |
commit | 5b1132531e902676c9872ffc2ab80ee3aac40aab (patch) | |
tree | d4b137f50471c099317d8aab5b76c3c2e30f3847 /token.h | |
parent | [PATCH] unary type fix (diff) | |
download | sparse-5b1132531e902676c9872ffc2ab80ee3aac40aab.tar.gz sparse-5b1132531e902676c9872ffc2ab80ee3aac40aab.tar.bz2 sparse-5b1132531e902676c9872ffc2ab80ee3aac40aab.zip |
[PATCH] comparison operations fix
simplify_int_binop() was completely broken for comparisons - there the
signedness of (converted) arguments can not be obtained from type of
result. IOW, we had all comparisons in constant expressions done as
signed ones.
Fixed by introducing new primitives for unsigned versions of
comparions (SPECIAL_UNSIGNED_LT, etc.) and remapping in evaluate_compare()
once we know the types. That also fixes similar mess in compile-i386 and
linearize.
Diffstat (limited to 'token.h')
-rw-r--r-- | token.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -109,7 +109,11 @@ enum special_token { SPECIAL_OR_ASSIGN, SPECIAL_XOR_ASSIGN, SPECIAL_HASHHASH, - SPECIAL_ARG_SEPARATOR + SPECIAL_ARG_SEPARATOR, + SPECIAL_UNSIGNED_LT, + SPECIAL_UNSIGNED_GT, + SPECIAL_UNSIGNED_LTE, + SPECIAL_UNSIGNED_GTE, }; struct string { |