shithub: scc

Download patch

ref: a5c12645afd1ef9898519afbac2b53c1e74a99d1
parent: 38245a0672da52532077f4ae2a49060f2ce67b22
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Jul 15 14:39:22 EDT 2014

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.

--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -145,7 +145,7 @@
 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;