]> git.gag.com Git - fw/sdcc/blobdiff - src/mcs51/gen.c
* src/SDCCast.c: added an additional type flow in decorateType() of opposite directio...
[fw/sdcc] / src / mcs51 / gen.c
index 20ad91eb614a24e23ca385f96c88d7801676ccc6..c3a96b8da557695ed7b713414ab8f3f2acfcd6e5 100644 (file)
@@ -4334,7 +4334,8 @@ genCmpGt (iCode * ic, iCode * ifx)
 
   letype = getSpec (operandType (left));
   retype = getSpec (operandType (right));
-  sign = !(SPEC_USIGN (letype) | SPEC_USIGN (retype));
+  sign = !((SPEC_USIGN (letype) && !(IS_CHAR (letype) && IS_LITERAL (letype))) ||
+           (SPEC_USIGN (retype) && !(IS_CHAR (retype) && IS_LITERAL (retype))));
   /* assign the amsops */
   aopOp (left, ic, FALSE);
   aopOp (right, ic, FALSE);
@@ -4363,8 +4364,8 @@ genCmpLt (iCode * ic, iCode * ifx)
 
   letype = getSpec (operandType (left));
   retype = getSpec (operandType (right));
-  sign = !(SPEC_USIGN (letype) | SPEC_USIGN (retype));
-
+  sign = !((SPEC_USIGN (letype) && !(IS_CHAR (letype) && IS_LITERAL (letype))) ||
+           (SPEC_USIGN (retype) && !(IS_CHAR (retype) && IS_LITERAL (retype))));
   /* assign the amsops */
   aopOp (left, ic, FALSE);
   aopOp (right, ic, FALSE);