ref: ed20286ef867b32a21feddc766d676b79254e640
parent: 7ba972cc2abea4cb7399b463d22f5dae705d2aa6
author: Roberto E. Vargas Caballero <[email protected]>
date: Mon Sep 14 13:59:23 EDT 2015
Simplify the easter egg
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -590,7 +590,7 @@
--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 @@
sym->flags = flags;
}
- /* TODO: disallow initializators in functions */
if (sym->token == IDEN && sym->type->op != FTN)
emit(ODECL, sym);
if (accept('='))