+2002-08-28 Bernhard Held <bernhard@bernhardheld.de>
+ * src/SDCCglue.c (printIvalArray): iterative calculation of array length
+
2002-08-28 Jesus Calvino-Fraga and Borut Razem <borut.razem@siol.net>
* sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
/*-----------------------------------------------------------------*/
/* printIvalArray - generates code for array initialization */
/*-----------------------------------------------------------------*/
-void
+void
printIvalArray (symbol * sym, sym_link * type, initList * ilist,
FILE * oFile)
{
initList *iloop;
int lcnt = 0, size = 0;
+ sym_link *last_type;
/* take care of the special case */
/* array of characters can be init */
}
iloop = ilist->init.deep;
- lcnt = DCL_ELEM (type);
+ lcnt = 1;
+ for (last_type = type; last_type; last_type = last_type->next)
+ lcnt *= DCL_ELEM (last_type);
for (;;)
{