ex = Safe_alloc ( sizeof (ast));
ex->type = type;
- ex->lineno = (noLineno ? oldLineno : yylineno);
+ ex->lineno = (noLineno ? oldLineno : mylineno);
ex->filename = currFname;
ex->level = NestLevel;
ex->block = currBlockno;
return ex;
}
-ast *
-newAst_STMNT (unsigned val)
-{
- ast *ex = newAst_ (EX_STMNT);
- ex->opval.stmnt = val;
- return ex;
-}
-
/*-----------------------------------------------------------------*/
/* newNode - creates a new node */
/*-----------------------------------------------------------------*/
if (constExprTree(cexpr->left) && constExprTree(cexpr->right)) {
return TRUE;
}
+ case EX_OPERAND:
+ return IS_CONSTANT(operandType(cexpr->opval.oprnd));
}
return FALSE;
}
{
werror (E_TYPE_MISMATCH, "assignment", " ");
printFromToType(RTYPE(tree),LTYPE(tree));
- //goto errorTreeReturn;
}
/* if the left side of the tree is of type void
if ((options.stackAuto || IFFUNC_ISREENT (LTYPE (tree))) &&
!IFFUNC_ISBUILTIN(LTYPE(tree)))
{
- //FUNC_ARGS(tree->left->ftype) =
- //reverseVal (FUNC_ARGS(tree->left->ftype));
reverseParms (tree->right);
}
- TETYPE (tree) = getSpec (TTYPE (tree) = LTYPE (tree)->next);
+ if (IS_CODEPTR(LTYPE(tree))) {
+ TTYPE(tree) = LTYPE(tree)->next->next;
+ } else {
+ TTYPE(tree) = LTYPE(tree)->next;
+ }
+ TETYPE (tree) = getSpec (TTYPE (tree));
return tree;
/*------------------------------------------------------------------*/
addSymChain (name);
allocVariables (name);
}
- name->lastLine = yylineno;
+ name->lastLine = mylineno;
currFunc = name;
/* set the stack pointer */