[hackers] [scc] Fix grammar bug in enum declaration || Roberto E. Vargas Caballero
commit 945fac774ed2588ee069a163f80e095fa2948ef9
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Jul 21 09:35:29 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Tue Jul 21 09:35:29 2015 +0200
Fix grammar bug in enum declaration
Enum constants are initialized with constant expressions, not
with initializators.
diff --git a/cc1/decl.c b/cc1/decl.c
index 565b5f3..0dfc62b 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -396,11 +396,11 @@ enumdcl(void)
if (yytoken != IDEN)
unexpected();
if ((sym = install(NS_IDEN)) == NULL)
- error("duplicated member '%s'", yytext);
+ error("'%s' redeclared as different kind of symbol", yytext);
next();
sym->type = inttype;
if (accept('='))
- initializer(sym);
+ constexpr();
sym->u.i = val++;
if (!accept(','))
break;
Received on Tue Jul 21 2015 - 09:45:27 CEST
This archive was generated by hypermail 2.3.0
: Tue Jul 21 2015 - 09:48:12 CEST