summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bf85b4c)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1578
4a8a32a2-be11-0410-ad9d-
d568d2c75423
lAst = decorateType (resolveSymbols (lAst));
rast = decorateType (resolveSymbols (createIval (lAst, sflds->type, iloop, rast)));
}
lAst = decorateType (resolveSymbols (lAst));
rast = decorateType (resolveSymbols (createIval (lAst, sflds->type, iloop, rast)));
}
+
+ if (iloop) {
+ werror (W_EXCESS_INITIALIZERS, "struct",
+ sym->opval.val->sym->name, sym->opval.val->sym->lineDef);
+ }
+
/* if there is an initial value */
if (sym->ival && SPEC_SCLS (sym->etype) != S_CODE)
{
/* if there is an initial value */
if (sym->ival && SPEC_SCLS (sym->etype) != S_CODE)
{
- if (IS_AGGREGATE (sym->type))
+ if (IS_AGGREGATE (sym->type)) {
work = initAggregates (sym, sym->ival, NULL);
work = initAggregates (sym, sym->ival, NULL);
work = newNode ('=', newAst_VALUE (symbolVal (sym)),
list2expr (sym->ival));
work = newNode ('=', newAst_VALUE (symbolVal (sym)),
list2expr (sym->ival));
setAstLineno (work, sym->lineDef);
sym->ival = NULL;
setAstLineno (work, sym->lineDef);
sym->ival = NULL;