shithub: scc

Download patch

ref: 48f3f5ac1c6fde47cbefefc1fcf125515a71a0e2
parent: f3ccbaf2c6369cfb1e3b61dfd6d559ef9f2f7edd
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Apr 7 17:00:17 EDT 2014

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.

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