]> git.gag.com Git - fw/sdcc/commitdiff
temporary disabled checkConstantRange, left a warning as a reminder
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 23 Nov 2001 19:45:14 +0000 (19:45 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 23 Nov 2001 19:45:14 +0000 (19:45 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1631 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCicode.c
src/SDCCval.c

index 6d0f16edd05b462483f6b722a7c6a8363a762f48..e3781a7f9df75872fff469bd9875a1bb01d792c0 100644 (file)
@@ -126,7 +126,8 @@ iCodeTable codeTable[] =
      pedantic>1: "char c=200" is not allowed (evaluates to -56)
 */
 
-void checkConstantRange(sym_link *ltype, value *val, char *msg, int pedantic) {
+void checkConstantRange(sym_link *ltype, value *val, char *msg, 
+                       int pedantic) {
   double max;
   char message[132]="";
   int warnings=0;
@@ -178,6 +179,7 @@ void checkConstantRange(sym_link *ltype, value *val, char *msg, int pedantic) {
     warnings++;
   }
 
+#if 0 // temporary disabled, leaving the warning as a reminder
   if (warnings) {
     sprintf (message, "for %s %s in %s", 
             SPEC_USIGN(ltype) ? "unsigned" : "signed",
@@ -187,6 +189,7 @@ void checkConstantRange(sym_link *ltype, value *val, char *msg, int pedantic) {
     if (pedantic>1)
       fatalError++;
   }
+#endif
 }
 
 /*-----------------------------------------------------------------*/
index ad57890f48fc701686527ade74e0bb6c417a5dfc..86de5525be63e892b658735dfee21d855529e1d0 100644 (file)
@@ -348,10 +348,9 @@ value *cheapestVal (value *val) {
     if (sval<0) {
       if (sval>=-32768) {
        SPEC_LONG(val->type)=0;
-       SPEC_CVAL(val->type).v_int = sval & 0xffff;
+       SPEC_CVAL(val->type).v_int = sval;
        if (sval>=-128) {
          SPEC_NOUN(val->type)=V_CHAR;
-         SPEC_CVAL(val->type).v_int &= 0xff;
        }
       }
     } else { // sval>=0
@@ -948,9 +947,6 @@ valComplement (value * val)
        SPEC_CVAL (val->etype).v_uint = ~SPEC_CVAL (val->etype).v_uint;
       else
        SPEC_CVAL (val->etype).v_int = ~SPEC_CVAL (val->etype).v_int;
-      if (SPEC_NOUN (val->etype)==V_CHAR) {
-       SPEC_CVAL (val->etype).v_uint &= 0xff;
-      }
     }
   return val;
 }
@@ -975,9 +971,6 @@ valNot (value * val)
        SPEC_CVAL (val->etype).v_uint = !SPEC_CVAL (val->etype).v_uint;
       else
        SPEC_CVAL (val->etype).v_int = !SPEC_CVAL (val->etype).v_int;
-      if (SPEC_NOUN (val->etype)==V_CHAR) {
-       SPEC_CVAL (val->etype).v_uint &= 0xff;
-      }
     }
   return val;
 }
@@ -1423,9 +1416,6 @@ valCastLiteral (sym_link * dtype, double fval)
              SPEC_CVAL (val->etype).v_uint = (unsigned short)l;
          else
              SPEC_CVAL (val->etype).v_int = (short)l;
-         if (SPEC_NOUN (val->etype)==V_CHAR) {
-             SPEC_CVAL (val->etype).v_uint &= 0xff; 
-         }
       }
   }
   return val;