]> git.gag.com Git - fw/sdcc/commitdiff
promote operand instead of result for +-*
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 29 Dec 2002 10:37:59 +0000 (10:37 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 29 Dec 2002 10:37:59 +0000 (10:37 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2126 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCast.c

index 14c2f2d1694b43c8a3ae0ef3ff342a386819e3b6..10ee1ea0c9a1058e022e06656b1f1a7fbbc5714c 100644 (file)
@@ -1963,7 +1963,8 @@ decorateType (ast * tree)
        has greater size than right */
     if (tree->left && tree->right && IS_AST_OP(tree->right) &&
        (tree->right->opval.op == LEFT_OP ||
-        tree->right->opval.op == '*' || // for int -> long only
+        (tree->right->opval.op == '*' /* for int -> long only */ &&
+         tree->right->right /* but not for deref */ ) ||
         tree->right->opval.op == '+' ||
         tree->right->opval.op == '-')) {
        int lsize = getSize(LTYPE(tree));