aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Cprint.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2022-09-19 16:37:17 +0200
committerGitHub <noreply@github.com>2022-09-19 16:37:17 +0200
commit994c6c34182606385140e5695e33c90507ce59ee (patch)
treee9291d64997dd3e2ac8660c0e6fbe1b9a597799e /cparser/Cprint.ml
parent103aa7074a9dd3b1bcb2864d52c89292a2ab7bff (diff)
downloadcompcert-994c6c34182606385140e5695e33c90507ce59ee.tar.gz
compcert-994c6c34182606385140e5695e33c90507ce59ee.zip
Support C11 Unicode string literals and character constants (#452)
* Support C11 Unicode string literals and character constants * Add tests for C11 string literals and character constants * Better error message for ill-formed universal character names E.g. \u followed by fewer than 4 hex digits, or \U followed by fewer than 8 hex digits. * Add new warning `invalid-utf8` for byte sequences that are not valid UTF8. The warning is activated but not fatal by default. * Warn on uses of C11 Unicode character constants and string literals This uses the `c11-extensions` warning, which is off by default. * Support preprocessing option -finput-charset= for GNU toolchains
Diffstat (limited to 'cparser/Cprint.ml')
-rw-r--r--cparser/Cprint.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/cparser/Cprint.ml b/cparser/Cprint.ml
index caa4fa66..05448784 100644
--- a/cparser/Cprint.ml
+++ b/cparser/Cprint.ml
@@ -75,7 +75,7 @@ let const pp = function
else fprintf pp "\\%03o" (Char.code c)
done;
fprintf pp "\""
- | CWStr l ->
+ | CWStr(l, _) ->
fprintf pp "L\"";
List.iter
(fun c ->