shithub: scc

Download patch

ref: afd74c04166cc70a18f519ffab65c6e9cf125e86
parent: f51c3127ed2a277489722c40aaa947b7fab7040f
author: Roberto E. Vargas Caballero <[email protected]>
date: Fri Jul 5 15:36:13 EDT 2013

Don't accept empty declarations

A line with only a ';' it is an statement, not a expression, and
it causes that if we are working in c89 the following declarations
are not allowed.

--- a/decl.c
+++ b/decl.c
@@ -218,8 +218,6 @@
 	register struct ctype *tp;
 	register struct node *np = NULL;
 
-	while (accept(';'))
-		/* nothing */;
 	if (!(tp = spec())) {
 		if (curctx != CTX_OUTER || yytoken != IDEN)
 			goto end;