aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/expression.h
diff options
authorLinus Torvalds <torvalds@penguin.transmeta.com>2003-04-04 18:45:37 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:00:13 -0700
commit05698d1e5a47ce5a9d9163e57731b16d4d3af9fb (patch)
tree75113cbc005589ab9216f9dabbcfb637c5f47355 /expression.h
parent6b4b251f9ad41e96d88f92b57930c4d01c7eddd4 (diff)
downloadsparse-dev-05698d1e5a47ce5a9d9163e57731b16d4d3af9fb.tar.gz
Evaluate logical expressions, and short-circuit it.
Make the pre-processor use the expression evaluator, so that it actually gets all the signed/unsigned comparisons right etc. Make logical expressions an expression type of their own. They have some very special behaviour both type-wise and evaluation-wise (the short-circuiting thing).
Diffstat (limited to 'expression.h')
-rw-r--r--expression.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/expression.h b/expression.h
index 4588f14f..36cd8b44 100644
--- a/expression.h
+++ b/expression.h
@@ -16,6 +16,7 @@ enum expression_type {
EXPR_SYMBOL,
EXPR_BINOP,
EXPR_ASSIGNMENT,
+ EXPR_LOGICAL,
EXPR_DEREF,
EXPR_PREOP,
EXPR_POSTOP,
@@ -56,7 +57,7 @@ struct expression {
// EXPR_STATEMENT
struct statement *statement;
- // EXPR_BINOP, EXPR_COMMA, EXPR_COMPARE and EXPR_ASSIGNMENT
+ // EXPR_BINOP, EXPR_COMMA, EXPR_COMPARE, EXPR_LOGICAL and EXPR_ASSIGNMENT
struct binop_arg {
struct expression *left, *right;
};