aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Viro <viro@www.linux.org.uk>2004-07-23 22:35:40 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:02:17 -0700
commit5b1132531e902676c9872ffc2ab80ee3aac40aab (patch)
treed4b137f50471c099317d8aab5b76c3c2e30f3847 /token.h
parent[PATCH] unary type fix (diff)
downloadsparse-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.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/token.h b/token.h
index 7bb0d43..1c9f2ab 100644
--- a/token.h
+++ b/token.h
@@ -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 {