Constants < 256 are char's, not short int's
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 4 Jun 2001 13:26:38 +0000 (13:26 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 4 Jun 2001 13:26:38 +0000 (13:26 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@867 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCval.c

index 091cd3ee314967561e643b949043ec347f70c60e..c197f817a803e9a5bcfd6e5bdfb3a307196e2a0e 100644 (file)
@@ -326,9 +326,9 @@ constVal (char *s)
        SPEC_CVAL (val->type).v_int = sval;
     }
 
-  // check the size and make it a short if required
+  // check the size and make it a char if possible
   if (sval < 256)
-    SPEC_SHORT (val->etype) = 1;
+    SPEC_NOUN (val->etype) = V_CHAR;
 
   return val;