scc

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

commit a5c12645afd1ef9898519afbac2b53c1e74a99d1
parent 38245a0672da52532077f4ae2a49060f2ce67b22
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 15 Jul 2014 18:39:22 +0200

Fix maximum number of declarators in declarator()

declarator() uses an aditional position for end of buffer, and
IDEN token takes one position, so the correct number of entries
is NR_DECLARATORS+2.

Diffstat:
Mcc1/decl.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cc1/decl.c b/cc1/decl.c @@ -145,7 +145,7 @@ declarator0(struct dcldata *dp) static Symbol * declarator(Type *tp, int8_t flags) { - struct dcldata data[NR_DECLARATORS+1]; + struct dcldata data[NR_DECLARATORS+2]; register struct dcldata *bp; Symbol *sym = NULL; static Symbol dummy;