ref: 409eba3f49437859eaa24909067891f775c7ec01
parent: 8c20c2d40ef87863abdc2e65985dae9088b3a3dd
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Apr 22 04:41:51 EDT 2014
Eval parameter of integeruop integeruop() can not deal with comparisions, so the parameter expression must be evaluated before of doing anything else.
--- a/expr.c
+++ b/expr.c
@@ -80,6 +80,7 @@
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);