scc

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

commit f87b1cd627c937f65d162f7450ed366b955bc6d7
parent 2393bf9e7136b037eb84221724721ff57af8b7d8
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 13 Jul 2017 18:18:03 +0200

[cc1] Add ONEG to the list of unary operators in simplify()

This operator was missed in the switch and fold() was called for it
which expects a binary operator

Diffstat:
cc1/fold.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/cc1/fold.c b/cc1/fold.c @@ -667,6 +667,7 @@ simplify(Node *np) case OA_ADD: case OA_SUB: case OCAST: + case ONEG: assert(!r); if ((p = foldunary(np, l)) != NULL) return p;