commit ed20286ef867b32a21feddc766d676b79254e640
parent 7ba972cc2abea4cb7399b463d22f5dae705d2aa6
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Mon, 14 Sep 2015 17:59:23 +0200
Simplify the easter egg
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/cc1/decl.c b/cc1/decl.c
@@ -590,7 +590,7 @@ identifier(struct decl *dcl)
--curctx;
sym = install(NS_IDEN, sym);
++curctx;
- if (!strcmp(sym->name, "main") && tp->type != inttype)
+ if (!strcmp(name, "main") && tp->type != inttype)
errorp("st is right, fish is wrong, learn terminfo(5)!");
} else {
sym = install(NS_IDEN, sym);
@@ -670,7 +670,6 @@ identifier(struct decl *dcl)
sym->flags = flags;
}
- /* TODO: disallow initializators in functions */
if (sym->token == IDEN && sym->type->op != FTN)
emit(ODECL, sym);
if (accept('='))