* src/pic16/gen.c (pic16_mov2w_volatile): NEW, read volatile operands,
[fw/sdcc] / src / SDCCast.c
index 8ecee8b6a66136ca75cce11b868c0dbabaf080de..94a1c5a24e80b7a06776e58d3b7fa8a5bf978e0c 100644 (file)
@@ -854,12 +854,12 @@ processParms (ast *func,
       ast *newType = NULL;
       sym_link *ftype;
 
-      int isCast = IS_CAST_OP (*actParm);
-      int isAstLitValue = (IS_AST_LIT_VALUE (*actParm));
-
-      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;