return 0;
}
+#if 0
+/* this functions seems to be superfluous?! kmh */
+
/*-----------------------------------------------------------------*/
/* resolveFromTable - will return the symbal table value */
/*-----------------------------------------------------------------*/
return val;
}
+#endif
/*-----------------------------------------------------------------*/
/* funcOfType :- function of type with name */
actParm->ftype= defParm->type;
}
- actParm->argSym = resolveFromTable(defParm)->sym ;
+/* actParm->argSym = resolveFromTable(defParm)->sym ; */
+ actParm->argSym = defParm->sym;
/* make a copy and change the regparm type to the defined parm */
actParm->etype = getSpec(actParm->ftype = copyLinkChain(actParm->ftype));
SPEC_REGPARM(actParm->etype) = SPEC_REGPARM(defParm->etype);
+ (*parmNumber)++;
return 0;
}
/*-----------------------------------------------------------------*/
ilist = ilist->init.deep ;
iExpr = decorateType(resolveSymbols(list2expr(ilist)));
- return newNode('=',sym,iExpr);
+ return decorateType(newNode('=',sym,iExpr));
}
/*-----------------------------------------------------------------*/
if (!iloop)
break;
sflds->implicit = 1;
- lAst = decorateType(resolveSymbols(newNode('.',sym,
- newAst(EX_VALUE,symbolVal(sflds)))));
+ lAst = newNode(PTR_OP,newNode('&',sym,NULL),newAst(EX_VALUE,symbolVal(sflds)));
+ lAst = decorateType(resolveSymbols(lAst));
rast = createIval (lAst, sflds->type, iloop,rast);
}
return rast ;
}
/*-----------------------------------------------------------------*/
-/* initAggregates - initialises aggregate variables with initv */
+/* initAggregates - initialises aggregate variables with initv */
/*-----------------------------------------------------------------*/
ast *initAggregates ( symbol *sym, initList *ival, ast *wid)
{
return FALSE;
else
return isConformingBody(pbody->left,sym,body) ;
- }
+ } else {
+ if (astHasSymbol(pbody->left,sym) ||
+ astHasSymbol(pbody->right,sym))
+ return FALSE;
+ }
+
/*------------------------------------------------------------------*/
case '|':
TTYPE(tree) = TETYPE(tree) =
tree->opval.val->type = tree->opval.val->sym->type =
tree->opval.val->etype = tree->opval.val->sym->etype =
- copyLinkChain(intType);
+ copyLinkChain(INTTYPE);
}
else {
}
if (SPEC_SCLS(tree->left->etype) == S_CODE) {
DCL_TYPE(p) = CPOINTER ;
- DCL_PTR_CONST(p) = 1;
+ DCL_PTR_CONST(p) = port->mem.code_ro;
}
else
if (SPEC_SCLS(tree->left->etype) == S_XDATA)
if (SPEC_SCLS(tree->left->etype) == S_IDATA)
DCL_TYPE(p) = IPOINTER ;
else
- if (SPEC_SCLS(tree->left->etype) == S_FLASH)
- DCL_TYPE(p) = FLPOINTER ;
+ if (SPEC_SCLS(tree->left->etype) == S_EEPROM)
+ DCL_TYPE(p) = EEPPOINTER ;
else
DCL_TYPE(p) = POINTER ;
return tree;
}
LRVAL(tree) = RRVAL(tree) = 1;
- COPYTYPE(TTYPE(tree),TETYPE(tree),LTYPE(tree));
+ if (IS_LITERAL(LTYPE(tree)) && !IS_LITERAL(RTYPE(tree))) {
+ COPYTYPE(TTYPE(tree),TETYPE(tree),RTYPE(tree));
+ } else {
+ COPYTYPE(TTYPE(tree),TETYPE(tree),LTYPE(tree));
+ }
return tree ;
/*------------------------------------------------------------------*/