X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCast.c;h=94a1c5a24e80b7a06776e58d3b7fa8a5bf978e0c;hb=4e6f7e6d83e4d3b37e439ca4e85232df1af69008;hp=ac571b5afa5332a9bacabb3b05d6e80dc86226a8;hpb=5cf049a9aca9a6693200563f5debc4d15f3ad21f;p=fw%2Fsdcc diff --git a/src/SDCCast.c b/src/SDCCast.c index ac571b5a..94a1c5a2 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -854,9 +854,12 @@ processParms (ast *func, ast *newType = NULL; sym_link *ftype; - if (IS_CAST_OP (*actParm) || + /* don't perform integer promotion of explicitly typecasted variable arguments + * if sdcc extensions are enabled */ + if (options.std_sdcc && + (IS_CAST_OP (*actParm) || (IS_AST_SYM_VALUE (*actParm) && AST_VALUES (*actParm, removedCast)) || - (IS_AST_LIT_VALUE (*actParm) && AST_VALUES (*actParm, literalFromCast))) + (IS_AST_LIT_VALUE (*actParm) && AST_VALUES (*actParm, literalFromCast)))) { /* Parameter was explicitly typecast; don't touch it. */ return 0;