scc

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

commit 0f0cbf03f9dcbee4dba981e29a7ea43d96e648e7
parent 5d10713e968041bbb85b19b5dc673d33b7d1ef7d
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon,  7 Sep 2015 23:19:24 +0200

Fix cast()

lp was not initialized in any place.

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

diff --git a/cc1/expr.c b/cc1/expr.c @@ -694,7 +694,8 @@ cast(void) error("cast specify a function type"); default: expect(')'); - if ((rp = convert(cast(), tp, 1)) == NULL) + lp = cast(); + if ((rp = convert(lp, tp, 1)) == NULL) error("bad type convertion requested"); rp->lvalue = lp->lvalue; }