commit 6590f76d9831666123aa9aa0de715f0b56b69126
parent 7c9e9d8479731a93dbbd18a06877b32f282d113e
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 4 Feb 2017 22:01:03 +0100
[cc1] Add fold case for !!
!!(a || b)
In this case we will have to ONEG together which can be folded.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/cc1/fold.c b/cc1/fold.c
@@ -377,6 +377,10 @@ foldunary(Node *np, Node *l)
Node *aux;
switch (np->op) {
+ case ONEG:
+ if (l->op == ONEG)
+ break;
+ return NULL;
case OADD:
DBG("FOLD unary delete %d", np->op);
np->left = NULL;