commit ed20286ef867b32a21feddc766d676b79254e640
Author: Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Mon Sep 14 17:59:23 2015 +0200
Commit: Roberto E. Vargas Caballero <[email protected]>
CommitDate: Mon Sep 14 17:59:23 2015 +0200
Simplify the easter egg
diff --git a/cc1/decl.c b/cc1/decl.c
index 13b328b..1c494e7 100644
--- 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('='))