aboutsummaryrefslogtreecommitdiff
path: root/test/char-const-u8.c
diff options
context:
space:
mode:
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");