SPEC_OCLS (sym->etype) = code;
/* if this is an interrupt service routine
then put it in the interrupt service array */
- if (FUNC_ISISR (sym->type) && !options.noiv)
+ if (FUNC_ISISR (sym->type) && !options.noiv
+ && (FUNC_INTNO (sym->type) != INTNO_UNSPEC))
{
-
if (interrupts[FUNC_INTNO (sym->type)])
werror (E_INT_DEFINED,
FUNC_INTNO (sym->type),
if (!lval->sym->isref)
{
lval->sym->allocreq = 0;
- werror (W_NO_REFERENCE, currFunc->name,
- "function argument", lval->sym->name);
+ werror (W_NO_REFERENCE,
+ currFunc ? currFunc->name : "(unknown)",
+ "function argument", lval->sym->name);
}
/* move the rname if any to the name for both val & sym */
}
/* if not used give a warning */
if (!sym->isref && !IS_STATIC (sym->etype))
- werror (W_NO_REFERENCE, currFunc->name,
+ werror (W_NO_REFERENCE,
+ currFunc ? currFunc->name : "(unknown)",
"local variable", sym->name);
/* now delete it from the symbol table */
deleteSym (SymbolTab, sym, sym->name);
allocIntoSeg (sym);
}
- setToNull ((void **) &overlay->syms);
+ setToNull ((void *) &overlay->syms);
}
addSet (&oset, sym);
}
- setToNull ((void **) &overlay->syms);
+ setToNull ((void *) &overlay->syms);
addSet (&ovrSetSets, oset);
}
void
printAllocInfo (symbol * func, FILE * of)
{
+ if (!func)
+ return;
+
if (!of)
of = stdout;
-
+
/* must be called after register allocation is complete */
fprintf (of, ";------------------------------------------------------------\n");
fprintf (of, ";Allocation info for local variables in function '%s'\n", func->name);