fixed bug #443257
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 30 Jul 2001 10:18:11 +0000 (10:18 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 30 Jul 2001 10:18:11 +0000 (10:18 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1109 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCast.c

index c2c4a06028231ff6fe0a24569d8044b252861d2e..a28cf06f54f7dbc9f475e0352584c6aa74aac17a 100644 (file)
@@ -2052,6 +2052,9 @@ decorateType (ast * tree)
              return decorateType (otree);
          }
 
+#if 0 
+         // we can't do this because of "(int & 0xff) << 3"
+
          /* if right or left is literal then result of that type */
          if (IS_LITERAL (RTYPE (tree)))
            {
@@ -2076,6 +2079,11 @@ decorateType (ast * tree)
                  TETYPE (tree) = getSpec (TTYPE (tree));
                }
            }
+#else
+         TTYPE (tree) =
+           computeType (LTYPE (tree), RTYPE (tree));
+         TETYPE (tree) = getSpec (TTYPE (tree));
+#endif
          LRVAL (tree) = RRVAL (tree) = 1;
          return tree;
        }