{
*end = newNode ('+', condExpr->left->right,
- newAst_VALUE (constVal ("1")));
+ newAst_VALUE (constCharVal (1)));
break;
}
return FALSE;
body->type = EX_OP;
body->opval.op = '-';
body->left = newAst_VALUE (symbolVal (sym));
- body->right = newAst_VALUE (constVal ("1"));
+ body->right = newAst_VALUE (constCharVal (1));
}
newNode (NULLOP,
newNode (SUB_ASSIGN,
newAst_VALUE (symbolVal (sym)),
- newAst_VALUE (constVal ("1"))),
+ newAst_VALUE (constCharVal (1))),
rloop))));
rloop->lineno=init->lineno;
copyAst (tree->right));
litTree->right->lineno = tree->lineno;
- tree->right->opval.val = constVal ("1");
+ tree->right->opval.val = constCharVal (1);
decorateType (parent, resultType);
}
else
{
tree->type = EX_VALUE;
tree->left = tree->right = NULL;
- tree->opval.val = constVal ("0");
+ tree->opval.val = constCharVal (0);
TETYPE (tree) = TTYPE (tree) = tree->opval.val->type;
return tree;
}
/* optimize bit-result, even if we optimize a buggy source */
tree->type = EX_VALUE;
- tree->opval.val = constVal ("1");
+ tree->opval.val = constCharVal (1);
}
else
tree->left = addCast (tree->left, resultTypeProp, TRUE);
tree->opval.op = '?';
tree->left = tree->left->left;
tree->right = newNode (':',
- newAst_VALUE (constVal ("1")),
- newAst_VALUE (constVal ("0")));
+ newAst_VALUE (constCharVal (1)),
+ newAst_VALUE (constCharVal (0)));
tree->right->lineno = tree->lineno;
tree->decorated = 0;
return decorateType (tree, resultType);
(tree->opval.op == LEFT_OP ? "left" : "right"));
tree->type = EX_VALUE;
tree->left = tree->right = NULL;
- tree->opval.val = constVal ("0");
+ tree->opval.val = constCharVal (0);
TETYPE (tree) = TTYPE (tree) = tree->opval.val->type;
return tree;
}
if (!options.lessPedantic)
werrorfl (tree->filename, tree->lineno, W_COMP_RANGE,
ccr_result == CCR_ALWAYS_TRUE ? "true" : "false");
- return decorateType (newAst_VALUE (constVal (
- ccr_result == CCR_ALWAYS_TRUE ? "1" : "0")),
+ return decorateType (newAst_VALUE (constCharVal (
+ ccr_result == CCR_ALWAYS_TRUE ? 1 : 0)),
resultType);
case CCR_OK:
default:
/* (unsigned value) ? 1 : 0 */
tree->opval.op = '?';
tree->right = newNode (':',
- newAst_VALUE (constVal ("1")),
+ newAst_VALUE (constCharVal (1)),
tree->right); /* val 0 */
tree->right->lineno = tree->lineno;
tree->right->left->lineno = tree->lineno;
case '>':
case '<':
case NE_OP:
- optExpr = newAst_VALUE (constVal ("0"));
+ optExpr = newAst_VALUE (constCharVal (0));
break;
case GE_OP:
case LE_OP:
case EQ_OP:
- optExpr = newAst_VALUE (constVal ("1"));
+ optExpr = newAst_VALUE (constCharVal (1));
break;
}
fixupInlineLabel (symbol * sym)
{
char name[SDCC_NAME_MAX + 1];
-
+
SNPRINTF(name, sizeof(name), "%s_%d", sym->name, inlineState.count);
strcpy (sym->name, name);
}
dest->level = src->level;
dest->block = src->block;
dest->seqPoint = src->seqPoint;
-
+
}