scc

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

commit 1a5ce7370f3e8b3d085f2dfd4fc4148cbac0d81c
parent bd6490db96cacfbb7a1eb13a54a00e2875fc4d24
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;