scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 3bffda9fb4ff86d00ee0e4e488447480d869da87
parent 0d3b55519d654762c70fad8b61dbaf52caf09601
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 28 Jun 2020 21:33:49 +0200

cc1: Improve main loop

The for form was too obscure and a while loop makes
clearer the objective of the loop.

Diffstat:
Msrc/cmd/cc/cc1/main.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/cmd/cc/cc1/main.c b/src/cmd/cc/cc1/main.c @@ -98,8 +98,9 @@ main(int argc, char *argv[]) if (onlycpp || onlyheader) { outcpp(); } else { - for (next(); yytoken != EOFTOK; decl()) - ; + next(); + while (yytoken != EOFTOK) + decl(); } return failure;