[hackers] [scc] [cc1] Fix bug after 0fc57e5 || Roberto E. Vargas Caballero
commit f51a68e44b4bb4255a371f30ec95da9282033bd5
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Wed May 11 16:59:35 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed May 11 16:59:35 2016 +0200
[cc1] Fix bug after 0fc57e5
0fc57e5 fixed a bug but introduced another one.
diff --git a/cc1/cpp.c b/cc1/cpp.c
index 6d96635..2015b4e 100644
--- a/cc1/cpp.c
+++ b/cc1/cpp.c
_AT_@ -304,7 +304,8 @@ getpars(Symbol *args[NR_MACROARG])
if (accept(')'))
return 0;
- for (n = 0; ; ++n) {
+ n = 0;
+ do {
if (n == NR_MACROARG) {
cpperror("too much parameters in macro");
return NR_MACROARG;
_AT_@ -315,11 +316,9 @@ getpars(Symbol *args[NR_MACROARG])
}
sym = install(NS_IDEN, yylval.sym);
sym->flags |= SUSED;
- args[n] = sym;
+ args[n++] = sym;
next();
- if (!accept(','))
- break;
- }
+ } while (accept(','));
expect(')');
return n;
Received on Wed May 11 2016 - 17:03:26 CEST
This archive was generated by hypermail 2.3.0
: Wed May 11 2016 - 17:12:15 CEST