* src/SDCCast.c, src/SDCCast.h: fixed RFE #1901171: inerger promotion
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 26 Feb 2008 06:24:45 +0000 (06:24 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 26 Feb 2008 06:24:45 +0000 (06:24 +0000)
  of casted varargs

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5049 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCast.c

index ada7111092898de6fa299f01c95fbceb6ef63653..7005c0c61875f7c73a217249a1303710d82c0b10 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-26 Borut Razem <borut.razem AT siol.net>
+
+       * src/SDCCast.c, src/SDCCast.h: fixed RFE #1901171 ] inerger promotion
+         of casted varargs
+
 2008-02-25 Maarten Brock <sourceforge.brock AT dse.nl>
 
        * src/mcs51/gen.c (genPagedPointerSet): fixed bug 1670148
index ac571b5afa5332a9bacabb3b05d6e80dc86226a8..94a1c5a24e80b7a06776e58d3b7fa8a5bf978e0c 100644 (file)
@@ -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;