scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 560dd3edc56c0a0baf08804246e57fb8006d3a87
parent f71c7191e4e1498955910bf1db4525343eaeb073
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 14 Aug 2015 18:56:07 +0200

Fix exp2cond() negation of the condition

The code was written for an anciant version of the values
of OEQ and ONE.

Diffstat:
Mcc1/expr.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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 *