aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-03-28 21:34:34 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 20:59:53 -0700
commit2ca23c6cb2f8cb7625e33702593c62fb91524797 (patch)
tree2dacc20ed1da18b1b9035fa4bb358cd704437d50 /expression.h
parentFix up integer constants to match magic rule: a normal decimal (diff)
downloadsparse-2ca23c6cb2f8cb7625e33702593c62fb91524797.tar.gz
sparse-2ca23c6cb2f8cb7625e33702593c62fb91524797.tar.bz2
sparse-2ca23c6cb2f8cb7625e33702593c62fb91524797.zip
Zero out the high bits when casting constants to a smaller type,
so that a EXPR_VALUE expression never contains extra bits that won't be used. It's just less confusing that way (but realize that we always keep the value unsigned, even if the _type_ is signed).
Diffstat (limited to 'expression.h')
-rw-r--r--expression.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/expression.h b/expression.h
index ddc1af4..bf201ba 100644
--- a/expression.h
+++ b/expression.h
@@ -36,7 +36,7 @@ struct expression {
struct symbol *ctype;
union {
// EXPR_VALUE
- long long value;
+ unsigned long long value;
// EXPR_UNOP, EXPR_PREOP and EXPR_POSTOP
struct expression *unop;