]> git.gag.com Git - fw/sdcc/blobdiff - src/SDCCval.c
Too much opposition against these range checks. It will only work now with --pedantic...
[fw/sdcc] / src / SDCCval.c
index 7c16fbdbbb5975c46fcfcd716e3fae275ba4c331..845faf3ff32eca486d793e365211286b42952f4f 100644 (file)
@@ -373,8 +373,10 @@ constVal (char *s)
   SPEC_NOUN (val->type) = V_INT;
   SPEC_SCLS (val->type) = S_LITERAL;
 
-  /* set the _unsigned flag if 'uU' found */
-  if (strchr (s, 'u') || strchr (s, 'U'))
+  /* set the _unsigned flag if 'uUoOxX' found */
+  if (strchr (s, 'u') || strchr (s, 'U') ||
+      strchr (s, 'o') || strchr (s, 'O') ||
+      strchr (s, 'x') || strchr (s, 'x'))
     SPEC_USIGN (val->type) = 1;
 
   /* set the _long flag if 'lL' is found */
@@ -711,6 +713,7 @@ charVal (char *s)
   val->type = val->etype = newLink ();
   val->type->class = SPECIFIER;
   SPEC_NOUN (val->type) = V_CHAR;
+  SPEC_USIGN(val->type) = 1;
   SPEC_SCLS (val->type) = S_LITERAL;
 
   s++;                         /* get rid of quotation */