commit 560dd3edc56c0a0baf08804246e57fb8006d3a87
Author: Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Fri Aug 14 18:56:07 2015 +0200
Commit: Roberto E. Vargas Caballero <[email protected]>
CommitDate: Fri Aug 14 18:56:07 2015 +0200
Fix exp2cond() negation of the condition
The code was written for an anciant version of the values
of OEQ and ONE.
diff --git a/cc1/expr.c b/cc1/expr.c
index ee23eb2..aa110a2 100644
--- a/cc1/expr.c
+++ b/cc1/expr.c
@@ -567,7 +567,7 @@ exp2cond(Node *np, char neg)
np = decay(np);
if (isnodecmp(np->op))
return (neg) ? negate(np) : np;
- return compare(ONE ^ neg, np, constnode(zero));
+ return compare((neg) ? OEQ : ONE, np, constnode(zero));
}
static Node *