aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c-lex.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 336159d..f4fdccc 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2019-11-14 Joseph Myers <joseph@codesourcery.com>
+
+ * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
+ char for C.
+
2019-11-14 Jakub Jelinek <jakub@redhat.com>
* c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
diff --git a/gcc/c-family/c-lex.c b/gcc/c-family/c-lex.c
index 42010a7..d446633f 100644
--- a/gcc/c-family/c-lex.c
+++ b/gcc/c-family/c-lex.c
@@ -1376,7 +1376,9 @@ lex_charconst (const cpp_token *token)
type = char16_type_node;
else if (token->type == CPP_UTF8CHAR)
{
- if (flag_char8_t)
+ if (!c_dialect_cxx ())
+ type = unsigned_char_type_node;
+ else if (flag_char8_t)
type = char8_type_node;
else
type = char_type_node;