upper case pragmas are deprecated
[fw/sdcc] / src / SDCCast.c
index 9944eb407736217f94da4d98f6533c0c194cd5de..2c13fef7d8effee0cf21f90441e3c8b6d23c65a6 100644 (file)
@@ -1746,7 +1746,7 @@ isConformingBody (ast * pbody, symbol * sym, ast * body)
     case '?':
     case ':':
     case SIZEOF:               /* evaluate wihout code generation */
-      
+
       if (IS_AST_SYM_VALUE (pbody->left) &&
          isSymbolEqual (AST_SYMBOL (pbody->left), sym))
        return FALSE;
@@ -3478,7 +3478,7 @@ decorateType (ast * tree)
              }
        }
       /* if unsigned value < 0  then always false */
-      /* if (unsigned value) > 0 then (unsigned value) */
+      /* if (unsigned value) > 0 then '(unsigned value) ? 1 : 0' */
       if (SPEC_USIGN(LETYPE(tree)) && IS_LITERAL(RTYPE(tree))  &&
          ((int) floatFromVal (valFromType (RETYPE (tree)))) == 0)
        {
@@ -3488,7 +3488,11 @@ decorateType (ast * tree)
            }
          if (tree->opval.op == '>')
            {
-             return tree->left;
+             tree->opval.op = '!';
+             tree->right = NULL;
+             LRVAL (tree) = 1;
+             TTYPE (tree) = TETYPE (tree) = newCharLink ();
+             return tree;
            }
         }
       /* if they are both literal then */