scc

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

commit 2350346b3eabce2f9bfcc7f1b12e0bb980edf591
parent 4875fa42070d04d0ad2688d76ae96eb6d5cb0224
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 11 Jun 2017 09:54:41 +0200

[cc1] Add comment about possible error in foldunary()

folding cast operator can generate wrong code

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

diff --git a/cc1/fold.c b/cc1/fold.c @@ -389,6 +389,7 @@ foldunary(Node *np, Node *l) case OCAST: if (op != OCAST) return foldcast(np, l); + /* TODO: This is wrong: (float)(int) 7.2 */ DBG("FOLD unary collapse %d", np->op); np->left = l->left; l->left = NULL;