/* no of elements given and we */
/* have generated for all of them */
- if (!--lcnt)
+ if (!--lcnt) {
+ /* if initializers left */
+ if (iloop) {
+ werror (W_EXESS_ARRAY_INITIALIZERS, sym->name, sym->lineDef);
+ }
break;
+ }
}
/* if we have not been given a size */
void
emitMaps ()
{
+ inInitMode++;
/* no special considerations for the following
data, idata & bit & xdata */
emitRegularMap (data, TRUE, TRUE);
emitRegularMap (code, TRUE, FALSE);
emitStaticSeg (statsg, code->oFile);
+ inInitMode--;
}
/*-----------------------------------------------------------------*/
if (!options.c1mode)
{
- sprintf (buffer, srcFileName);
- strcat (buffer, port->assembler.file_ext);
+ sprintf (scratchFileName, srcFileName);
+ strcat (scratchFileName, port->assembler.file_ext);
}
else
{
- strcpy (buffer, options.out_name);
+ strcpy (scratchFileName, options.out_name);
}
- if (!(asmFile = fopen (buffer, "w")))
+ if (!(asmFile = fopen (scratchFileName, "w")))
{
- werror (E_FILE_OPEN_ERR, buffer);
+ werror (E_FILE_OPEN_ERR, scratchFileName);
exit (1);
}