scc

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

commit afd74c04166cc70a18f519ffab65c6e9cf125e86
parent f51c3127ed2a277489722c40aaa947b7fab7040f
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri,  5 Jul 2013 19:36:13 +0200

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.

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

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