fixed a warning about the new enum ASTTYPE
[fw/sdcc] / src / SDCCast.c
index dd7e0de77da28fae6ffe172bd35a800e5a9e8c26..5fd567323c44e56ee27c456b757f2b77786108d6 100644 (file)
@@ -110,14 +110,6 @@ newAst_LINK (sym_link * val)
   return ex;
 }
 
-ast *
-newAst_STMNT (unsigned val)
-{
-  ast *ex = newAst_ (EX_STMNT);
-  ex->opval.stmnt = val;
-  return ex;
-}
-
 /*-----------------------------------------------------------------*/
 /* newNode - creates a new node                                    */
 /*-----------------------------------------------------------------*/
@@ -1287,6 +1279,8 @@ bool constExprTree (ast *cexpr) {
       if (constExprTree(cexpr->left) && constExprTree(cexpr->right)) {
        return TRUE;
       }
+    case EX_OPERAND:
+      return IS_CONSTANT(operandType(cexpr->opval.oprnd));
     }
   return FALSE;
 }