commit 2afac7e64519cbcbf3d081a9061329badcf88344
Author: Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Sat Aug 15 11:13:11 2015 +0200
Commit: Roberto E. Vargas Caballero <[email protected]>
CommitDate: Sat Aug 15 11:13:11 2015 +0200
Convert second expression of for(;;) in a condition
diff --git a/cc1/stmt.c b/cc1/stmt.c
index 75f9119..c31fd8d 100644
--- 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(')');