+2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+ * src/SDCCast.c (isConformingBody): fixed bug #949967
+ * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
+ convilong): fixed bug #952086
+
2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
* src/SDCCmem.c (allocVariables): fixed bug #955321
/*------------------------------------------------------------------*/
case '[':
// if the loopvar is used as an index
- if (astHasSymbol(pbody->right, sym)) {
+ /* array op is commutative -- must check both left & right */
+ if (astHasSymbol(pbody->right, sym) || astHasSymbol(pbody->left, sym)) {
return FALSE;
}
- return isConformingBody (pbody->right, sym, body);
+ return isConformingBody (pbody->right, sym, body)
+ && isConformingBody (pbody->left, sym, body);
/*------------------------------------------------------------------*/
case PTR_OP:
IC_RESULT (newic) = IC_RESULT (ic);
newic->lineno = lineno;
newic->parmBytes+=bytesPushed;
-
+ ebp->hasFcall = 1;
+ if (currFunc)
+ FUNC_HASFCALL (currFunc->type) = 1;
+
if(TARGET_IS_PIC16) {
/* normally these functions aren't marked external, so we can use their
* _extern field to marked as already added to symbol table */
newic = newiCode (CALL, operandFromSymbol (func), NULL);
IC_RESULT (newic) = IC_RESULT (ic);
newic->parmBytes+=bytesPushed;
+ ebp->hasFcall = 1;
+ if (currFunc)
+ FUNC_HASFCALL (currFunc->type) = 1;
if(TARGET_IS_PIC16) {
/* normally these functions aren't marked external, so we can use their
newic = newiCode (CALL, operandFromSymbol (func), NULL);
IC_RESULT (newic) = IC_RESULT (ic);
newic->parmBytes+=bytesPushed;
+ ebp->hasFcall = 1;
+ if (currFunc)
+ FUNC_HASFCALL (currFunc->type) = 1;
if(TARGET_IS_PIC16) {
/* normally these functions aren't marked external, so we can use their
IC_RESULT (newic) = IC_RESULT (ic);
newic->lineno = lineno;
newic->parmBytes+=bytesPushed; // to clear the stack after the call
+ ebp->hasFcall = 1;
+ if (currFunc)
+ FUNC_HASFCALL (currFunc->type) = 1;
if(TARGET_IS_PIC16) {
/* normally these functions aren't marked external, so we can use their