Constants < 256 are char's, not short int's
[fw/sdcc] / 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;