[hackers] [scc] Integrate initlist in initiliazer() || Roberto E. Vargas Caballero
commit e58e000f02f4ed8c9655eb587cc6f817b84af1f1
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Sep 10 22:33:37 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Thu Sep 10 22:33:37 2015 +0200
Integrate initlist in initiliazer()
diff --git a/cc1/expr.c b/cc1/expr.c
index ea7916e..3b92485 100644
--- a/cc1/expr.c
+++ b/cc1/expr.c
_AT_@ -980,31 +980,18 @@ condexpr(void)
/* TODO: check correctness of the initializator */
/* TODO: emit initializer */
-static void
-initlist(void)
-{
- Node *np;
-
- if (yytoken == '}')
- return;
-
- do {
- if (accept('{'))
- initlist();
- assign();
- } while (accept(','));
-
- expect('}');
-}
-
void
initializer(Symbol *sym)
{
Node *np;
+ Type *tp = sym->type;
int flags = sym->flags;
if (accept('{')) {
- initlist();
+ do {
+ initializer(sym);
+ } while (accept(','));
+ expect('}');
return;
}
np = assignop(OINIT, varnode(sym), assign());
Received on Thu Sep 10 2015 - 22:57:32 CEST
This archive was generated by hypermail 2.3.0
: Thu Sep 10 2015 - 23:00:16 CEST