commit 409eba3f49437859eaa24909067891f775c7ec01
parent 8c20c2d40ef87863abdc2e65985dae9088b3a3dd
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Tue, 22 Apr 2014 08:41:51 +0200
Eval parameter of integeruop
integeruop() can not deal with comparisions, so the parameter expression
must be evaluated before of doing anything else.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/expr.c b/expr.c
@@ -80,6 +80,7 @@ integerop(char op, Node *np1, Node *np2)
static Node *
integeruop(char op, Node *np)
{
+ np = eval(np);
if (np->typeop != INT)
error("unary operator requires integer operand");
return unarycode(op, np->type, np);