a better fix for "if ( -v < 3)"
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 26 Mar 2003 08:25:37 +0000 (08:25 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 26 Mar 2003 08:25:37 +0000 (08:25 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2417 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCast.c

index 51b016fd0bd56b1b5600a1fb4e82eba3a84caa25..644d8fb3ddbafd082976f2cbc064cd712227a11d 100644 (file)
@@ -2563,7 +2563,7 @@ decorateType (ast * tree)
              return tree;
            }
          LRVAL (tree) = 1;
-         TTYPE (tree) = LTYPE (tree);
+         TETYPE(tree) = getSpec (TTYPE (tree) = LTYPE (tree));
          return tree;
        }
 
@@ -2930,8 +2930,7 @@ decorateType (ast * tree)
        }
       /* if unsigned value < 0  then always false */
       /* if (unsigned value) > 0 then (unsigned value) */
-      if (LETYPE(tree) && SPEC_USIGN(LETYPE(tree)) &&
-         RTYPE(tree)  && IS_LITERAL(RTYPE(tree))  && 
+      if (SPEC_USIGN(LETYPE(tree)) && IS_LITERAL(RTYPE(tree))  && 
          ((int) floatFromVal (valFromType (RETYPE (tree)))) == 0) {
 
          if (tree->opval.op == '<') {