symbols in a single overlay */
set *ovrSetSets = NULL;
-int maxRegBank = 0;
int fatalError = 0; /* fatal error flag */
/*-----------------------------------------------------------------*/
if (sym->_isparm)
return FALSE;
/* if code change to constant */
- if (sym->ival && (sym->level==0) && SPEC_ABSA (sym->etype))
+ if (sym->ival && SPEC_ABSA (sym->etype))
{
SPEC_OCLS(sym->etype) = c_abs;
}
break;
case S_XDATA:
/* absolute initialized global */
- if (sym->ival && (sym->level==0) && SPEC_ABSA (sym->etype))
+ if (sym->ival && SPEC_ABSA (sym->etype))
{
SPEC_OCLS(sym->etype) = x_abs;
}
break;
case S_DATA:
/* absolute initialized global */
- if (sym->ival && (sym->level==0) && SPEC_ABSA (sym->etype))
+ if (sym->ival && SPEC_ABSA (sym->etype))
{
SPEC_OCLS(sym->etype) = d_abs;
}
break;
case S_IDATA:
/* absolute initialized global */
- if (sym->ival && (sym->level==0) && SPEC_ABSA (sym->etype))
+ if (sym->ival && SPEC_ABSA (sym->etype))
{
SPEC_OCLS(sym->etype) = i_abs;
}
if (lval->sym->rname[0])
{
char buffer[SDCC_NAME_MAX];
+ symbol * argsym = lval->sym;
+
strncpyz (buffer, lval->sym->rname, sizeof(buffer));
lval->sym = copySymbol (lval->sym);
strncpyz (lval->sym->rname, buffer, sizeof(lval->sym->rname));
+
strncpyz (lval->sym->name, buffer, sizeof(lval->sym->name));
- strncpyz (lval->name, buffer, sizeof(lval->name));
+ /* need to keep the original name for inlining to work */
+ /*strncpyz (lval->name, buffer, sizeof(lval->name)); */
+
addSym (SymbolTab, lval->sym, lval->sym->name,
lval->sym->level, lval->sym->block, 1);
lval->sym->_isparm = 1;
{
addSet(&operKeyReset, lval->sym);
}
+
+ /* restore the original symbol */
+ lval->sym = argsym;
}
}
return;
SPEC_EXTR (sym->etype) = 0;
addSym (TypedefTab, sym, sym->name, sym->level, sym->block, 0);
- continue; /* go to the next one */
+ continue; /* go to the next one */
}
- /* make sure it already exist */
+ /* make sure it already exists */
csym = findSymWithLevel (SymbolTab, sym);
if (!csym || (csym && csym->level != sym->level))
csym = sym;
/* check the declaration */
checkDecl (csym,0);
- /* if this is a function or a pointer to function */
- /* then args processing */
+ /* if this is a function or a pointer to a */
+ /* function then do args processing */
if (funcInChain (csym->type))
{
processFuncArgs (csym);
-
- /* if register bank specified then update maxRegBank */
- if (maxRegBank < FUNC_REGBANK (csym->type))
- maxRegBank = FUNC_REGBANK (csym->type);
- /*JCF: Mark the register bank as used*/
- RegBankUsed[FUNC_REGBANK(csym->type)]=1;
}
/* if this is a extern variable then change the */
- /* level to zero temporarily */
+ /* level to zero temporarily */
if (IS_EXTERN (csym->etype) || IS_FUNC (csym->type))
{
saveLevel = csym->level;
if (IS_LITERAL (sym->etype))
continue;
- /* generate the actual declaration */
+ /* generate the actual declaration */
if (csym->level)
{
allocLocal (csym);