scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 2afac7e64519cbcbf3d081a9061329badcf88344
parent a993e8c13722106027d20e89369be1cc02753083
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat, 15 Aug 2015 11:13:11 +0200

Convert second expression of for(;;) in a condition

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

diff --git a/cc1/stmt.c b/cc1/stmt.c @@ -91,7 +91,7 @@ For(Symbol *lbreak, Symbol *lcont, Caselist *lswitch) expect('('); einit = (yytoken != ';') ? expr() : NULL; expect(';'); - econd = (yytoken != ';') ? expr() : NULL; + econd = (yytoken != ';') ? condition() : NULL; expect(';'); einc = (yytoken != ')') ? expr() : NULL; expect(')');