commit 6590f76d9831666123aa9aa0de715f0b56b69126
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Sat Feb 4 22:01:03 2017 +0100
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Sat Feb 4 22:06:07 2017 +0100

    [cc1] Add fold case for !!
    
        !!(a || b)
    
    In this case we will have to ONEG together which can be folded.

diff --git a/cc1/fold.c b/cc1/fold.c
index 90a3445..7f8416a 100644
--- 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;

Reply via email to