scc

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

commit beef986e3e0d7efc6a210bb80a2019efd2cee6ae
parent 426818d5e07f09bdfe91272450dd2234f89f8096
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 17 Apr 2014 15:49:45 +0200

Fix cast()

The correct node is stored in np2, but the code was returning
np1, so the order of the cast was inverted.

Diffstat:
Mexpr.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/expr.c b/expr.c @@ -502,7 +502,7 @@ cast(void) if ((np2 = convert(np1, tp, 1)) == NULL) error("bad type convertion requested"); np2->b.lvalue = np1->b.lvalue; - return np1; + return np2; default: break; }