+2008-02-24 Borut Razem <borut.razem AT siol.net>
+
+ * src/SDCCast.c, src/SDCCast.h: fixed bug #1874922: explicit typecast
+ is ineffective for unsigned char parameter
+
2008-02-24 Maarten Brock <sourceforge.brock AT dse.nl>
* src/SDCCast.c (expandInlineFuncs): fixed bug 1875869
2008-02-22 Philipp Klaus Krause <pkk AT spth.de>
* src/z80/gen.c (genMult): Rewrote 8-bit multiplication by constant,
- implements #1898231
+ implements #1898231
2008-02-22 Philipp Klaus Krause <pkk AT spth.de>
* device/lib/z80/mul.s: Rewrote __muluchar_rrx_s, to improve 8-bit mult.,
- implements #1896290
+ implements #1896290
2008-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
dest->level = src->level;
dest->funcName = src->funcName;
dest->reversed = src->reversed;
+ dest->actualArgument = src->actualArgument;
if (src->ftype)
dest->etype = getSpec (dest->ftype = copyLinkChain (src->ftype));
}
}
+ /* mark the actual parameter */
+ (*actParm)->actualArgument = 1;
+
/* decorate parameter */
resultType = defParm ? getResultTypeFromType (defParm->type) :
RESULT_TYPE_NONE;
ast *newType = NULL;
sym_link *ftype;
+ int isCast = IS_CAST_OP (*actParm);
+ int isAstLitValue = (IS_AST_LIT_VALUE (*actParm));
+
if (IS_CAST_OP (*actParm)
- || (IS_AST_LIT_VALUE (*actParm) && (*actParm)->values.literalFromCast))
+ || (IS_AST_LIT_VALUE (*actParm) && (*actParm)->values.literalFromCast))
{
/* Parameter was explicitly typecast; don't touch it. */
return 0;
changePointer(LTYPE(tree));
checkTypeSanity(LETYPE(tree), "(cast)");
- /* if 'from' and 'to' are the same remove the superfluous cast, */
- /* this helps other optimizations */
- if (compareTypeExact (LTYPE(tree), RTYPE(tree), -1) == 1)
+
+ /* if not an actual argument and
+ * if 'from' and 'to' are the same remove the superfluous cast,
+ * this helps other optimizations */
+ if (!tree->actualArgument && compareTypeExact (LTYPE(tree), RTYPE(tree), -1) == 1)
{
return tree->right;
}
if (!options.lessPedantic)
werrorfl (tree->filename, tree->lineno, W_COMP_RANGE,
ccr_result == CCR_ALWAYS_TRUE ? "true" : "false");
- return decorateType (newAst_VALUE (constCharVal (
- (unsigned char)(ccr_result == CCR_ALWAYS_TRUE ? 1 : 0))),
- resultType);
+ return decorateType (newAst_VALUE (constCharVal ((unsigned char)(ccr_result == CCR_ALWAYS_TRUE))), resultType);
case CCR_OK:
default:
break;
ast * assigntree;
symbol * parm;
ast * passedarg = inlineFindParm (tree->right, argIndex);
-
+
if (!passedarg)
{
werror(E_TOO_FEW_PARMS);