aboutsummaryrefslogtreecommitdiff
path: root/test/char-const-u8.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2021-10-21 20:15:15 -0700
committerMichael Forney <mforney@mforney.org>2021-10-21 20:15:15 -0700
commitf685cdc1cd6baa17879b15326f553409258d3f73 (patch)
tree09fcc4c01a0703abecc3d861d983b52fa1938d89 /test/char-const-u8.c
parent8b3c7cbd735d959e8bbe9fd6a382a946d3cbfb63 (diff)
expr: Add support for UTF-8 character constants
Diffstat (limited to 'test/char-const-u8.c')
-rw-r--r--test/char-const-u8.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/char-const-u8.c b/test/char-const-u8.c
new file mode 100644
index 0000000..9f20452
--- /dev/null
+++ b/test/char-const-u8.c
@@ -0,0 +1,3 @@
+unsigned char u8 = u8'a';
+_Static_assert(__builtin_types_compatible_p(__typeof__(u8'b'), unsigned char),
+ "UTF-8 character constant has incorrect type");