scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit b4b8c8c5ff06d158b4aaa3811bcb39ce2a7c07e8
parent 7c7fb51c9d0b8fd7f3497d87d6425eb9a9037e3d
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 13 Jul 2014 06:54:36 +0200

Remove qualifer stuff from declarator0()

This stuff is not going to be used anymore.

Diffstat:
Mcc1/decl.c | 21++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/cc1/decl.c b/cc1/decl.c @@ -124,36 +124,23 @@ directdcl(struct dcldata *dp, int8_t flags) static struct dcldata* declarator0(struct dcldata *dp, int8_t flags) { - uint8_t buffer[NR_DECLARATORS]; - register uint8_t *bp, n, qlf; + register uint8_t n; - bp = buffer; for (n = 0; accept('*'); ++n) { - if (n == NR_DECLARATORS) - goto too_much_declarators; - qlf = 0; - if (yytoken == TQUALIFIER) { - qlf |= yylval.token; - next(); - } - *bp++ = qlf; + while (accept(TQUALIFIER)) + /* nothing */; } dp = directdcl(dp, flags); - bp = buffer; while (n--) { if (dp->op == 255) - goto too_much_declarators; + error("too much declarators"); dp->op = PTR; - dp->u.qlf = *bp++; ++dp; } return dp; - -too_much_declarators: - error("too much declarators"); } static Symbol *