aboutsummaryrefslogtreecommitdiff
path: root/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'expr.c')
-rw-r--r--expr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/expr.c b/expr.c
index 27acbcf..6ff7dd4 100644
--- a/expr.c
+++ b/expr.c
@@ -596,11 +596,11 @@ primaryexpr(struct scope *s)
break;
case TCHARCONST:
src = tok.lit;
- t = &typeint;
switch (*src) {
case 'L': ++src; t = targ->typewchar; break;
- case 'u': ++src; t = &typeushort; break;
- case 'U': ++src; t = &typeuint; break;
+ case 'u': ++src; t = *src == '8' ? ++src, &typeuchar : &typeushort; break;
+ case 'U': ++src; t = &typeuint; break;
+ default: t = &typeint;
}
assert(*src == '\'');
++src;