scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 3d2cb9931a7aa956b7cd04a13de1711d7dd5dd48
parent 0d0bc82ddf683049af8ed69d23be227001be18c3
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 11 Jul 2014 09:15:19 +0200

Simplify directdcl()

Removed a goto that was not necessary.

Diffstat:
cc1/decl.c | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/cc1/decl.c b/cc1/decl.c @@ -70,7 +70,7 @@ directdcl(struct dcldata *dp, int8_t flags) } else if (flags) { if (yytoken != IDEN) { if (flags & ID_EXPECTED) - goto expected; + error("unexpected '%s'", yytext); sym = install("", NS_IDEN); } else { sym = newiden(); @@ -87,9 +87,6 @@ directdcl(struct dcldata *dp, int8_t flags) default: return dp; } } - -expected: - error("expected '(' or identifier before of '%s'" , yytext); } static struct dcldata*