scc

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

commit 48f3f5ac1c6fde47cbefefc1fcf125515a71a0e2
parent f3ccbaf2c6369cfb1e3b61dfd6d559ef9f2f7edd
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon,  7 Apr 2014 21:00:17 +0200

Fix structures declaration

The only good character after a struct declaration was a
semicolon or a IDEN, so it was impossible declarate a pointer
,
or a qualifier. This patch fixs this problem.

Diffstat:
Mdecl.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/decl.c b/decl.c @@ -367,8 +367,7 @@ structdcl(void) tp = newtag(tag); tp->u.fields = NULL; ns = tp->sym->u.ns; - if (yytoken != ';') { - expect('{'); + if (accept('{')) { if (tp->defined) goto redefined; tp->defined = 1;