diff options
| author | Linus Torvalds <torvalds@penguin.transmeta.com> | 2003-04-04 18:45:37 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:00:13 -0700 |
| commit | 05698d1e5a47ce5a9d9163e57731b16d4d3af9fb (patch) | |
| tree | 75113cbc005589ab9216f9dabbcfb637c5f47355 /expression.c | |
| parent | 6b4b251f9ad41e96d88f92b57930c4d01c7eddd4 (diff) | |
| download | sparse-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.c')
| -rw-r--r-- | expression.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/expression.c b/expression.c index be6ad2ff..bc36563a 100644 --- a/expression.c +++ b/expression.c @@ -433,12 +433,12 @@ static struct token *bitwise_or_expression(struct token *token, struct expressio static struct token *logical_and_expression(struct token *token, struct expression **tree) { - return lr_binop_expression(token, tree, EXPR_BINOP, bitwise_or_expression, SPECIAL_LOGICAL_AND, 0); + return lr_binop_expression(token, tree, EXPR_LOGICAL, bitwise_or_expression, SPECIAL_LOGICAL_AND, 0); } static struct token *logical_or_expression(struct token *token, struct expression **tree) { - return lr_binop_expression(token, tree, EXPR_BINOP, logical_and_expression, SPECIAL_LOGICAL_OR, 0); + return lr_binop_expression(token, tree, EXPR_LOGICAL, logical_and_expression, SPECIAL_LOGICAL_OR, 0); } struct token *conditional_expression(struct token *token, struct expression **tree) |
