aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/cpp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2022-08-26 09:24:56 +0200
committerJakub Jelinek <jakub@redhat.com>2022-08-26 09:27:39 +0200
commiteb4879ab9053085a59b8d1594ef76487948bba7e (patch)
treeea5328515c81dd4505284ce2cd0aa37ebaa56b40 /gcc/testsuite/c-c++-common/cpp
parent670961f051aedbac21bc769c21c5b28b338b6003 (diff)
downloadgcc-eb4879ab9053085a59b8d1594ef76487948bba7e.zip
gcc-eb4879ab9053085a59b8d1594ef76487948bba7e.tar.gz
gcc-eb4879ab9053085a59b8d1594ef76487948bba7e.tar.bz2
c++: Implement C++23 P2071R2 - Named universal character escapes [PR106648]
The following patch implements the C++23 P2071R2 - Named universal character escapes paper to support \N{LATIN SMALL LETTER E} etc. I've used Unicode 14.0, there are 144803 character name properties (including the ones generated by Unicode NR1 and NR2 rules) and correction/control/alternate aliases, together with zero terminators that would be 3884745 bytes, which is clearly unacceptable for libcpp. This patch instead contains a generator which from the UnicodeData.txt and NameAliases.txt files emits a space optimized radix tree (208765 bytes long for 14.0), a single string literal dictionary (59418 bytes), maximum name length (currently 88 chars) and two small helper arrays for the NR1/NR2 name generation. The radix tree needs 2 to 9 bytes per node, the exact format is described in the generator program. There could be ways to shrink the dictionary size somewhat at the expense of slightly slower lookups. Currently the patch implements strict matching (that is what is needed to actually implement it on valid code) and Unicode UAX44-LM2 algorithm loose matching to provide hints (that algorithm essentially ignores hyphens in between two alphanumeric characters, spaces and underscores (with one exception for hyphen) and does case insensitive matching). In the attachment is a WIP patch that shows how to implement also spellcheck.{h,cc} style discovery of misspellings, but I'll need to talk to David Malcolm about it, as spellcheck.{h,cc} is in gcc/ subdir (so the WIP incremental patch instead prints all the names to stderr). 2022-08-26 Jakub Jelinek <jakub@redhat.com> PR c++/106648 libcpp/ * charset.cc: Implement C++23 P2071R2 - Named universal character escapes. Include uname2c.h. (hangul_syllables, hangul_count): New variables. (struct uname2c_data): New type. (_cpp_uname2c, _cpp_uname2c_uax44_lm2): New functions. (_cpp_valid_ucn): Use them. Handle named universal character escapes. (convert_ucn): Adjust comment. (convert_escape): Call convert_ucn even for \N. (_cpp_interpret_identifier): Handle named universal character escapes. * lex.cc (get_bidi_ucn): Fix up function comment formatting. (get_bidi_named): New function. (forms_identifier_p, lex_string): Handle named universal character escapes. * makeuname2c.cc: New file. Small parts copied from makeucnid.cc. * uname2c.h: New generated file. gcc/c-family/ * c-cppbuiltin.cc (c_cpp_builtins): Predefine __cpp_named_character_escapes to 202207L. gcc/testsuite/ * c-c++-common/cpp/named-universal-char-escape-1.c: New test. * c-c++-common/cpp/named-universal-char-escape-2.c: New test. * c-c++-common/cpp/named-universal-char-escape-3.c: New test. * c-c++-common/cpp/named-universal-char-escape-4.c: New test. * c-c++-common/Wbidi-chars-25.c: New test. * gcc.dg/cpp/named-universal-char-escape-1.c: New test. * gcc.dg/cpp/named-universal-char-escape-2.c: New test. * g++.dg/cpp/named-universal-char-escape-1.C: New test. * g++.dg/cpp/named-universal-char-escape-2.C: New test. * g++.dg/cpp23/feat-cxx2b.C: Test __cpp_named_character_escapes.
Diffstat (limited to 'gcc/testsuite/c-c++-common/cpp')
-rw-r--r--gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-1.c174
-rw-r--r--gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-2.c18
-rw-r--r--gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-3.c22
-rw-r--r--gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-4.c60
4 files changed, 274 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-1.c b/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-1.c
new file mode 100644
index 0000000..3c692f45
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-1.c
@@ -0,0 +1,174 @@
+/* P2071R2 - Named universal character escapes */
+/* { dg-do run } */
+/* { dg-require-effective-target wchar } */
+/* { dg-options "-std=gnu99 -Wno-c++-compat" { target c } } */
+/* { dg-options "-std=c++23" { target c++ } } */
+
+#ifndef __cplusplus
+#include <wchar.h>
+typedef __CHAR16_TYPE__ char16_t;
+typedef __CHAR32_TYPE__ char32_t;
+#endif
+
+#ifdef __cplusplus
+#if U'\u0000' != U'\N{NULL}' \
+ || U'\u0001' != U'\N{START OF HEADING}' \
+ || U'\u0002' != U'\N{START OF TEXT}' \
+ || U'\u0003' != U'\N{END OF TEXT}' \
+ || U'\u0004' != U'\N{END OF TRANSMISSION}' \
+ || U'\u0005' != U'\N{ENQUIRY}' \
+ || U'\u0006' != U'\N{ACKNOWLEDGE}' \
+ || U'\u0007' != U'\N{ALERT}' \
+ || U'\u0008' != U'\N{BACKSPACE}' \
+ || U'\u0009' != U'\N{CHARACTER TABULATION}' \
+ || U'\u0009' != U'\N{HORIZONTAL TABULATION}' \
+ || U'\u000A' != U'\N{LINE FEED}' \
+ || U'\u000A' != U'\N{NEW LINE}' \
+ || U'\u000A' != U'\N{END OF LINE}' \
+ || U'\u000B' != U'\N{LINE TABULATION}' \
+ || U'\u000B' != U'\N{VERTICAL TABULATION}' \
+ || U'\u000C' != U'\N{FORM FEED}' \
+ || U'\u000D' != U'\N{CARRIAGE RETURN}' \
+ || U'\u000E' != U'\N{SHIFT OUT}' \
+ || U'\u000E' != U'\N{LOCKING-SHIFT ONE}' \
+ || U'\u000F' != U'\N{SHIFT IN}' \
+ || U'\u000F' != U'\N{LOCKING-SHIFT ZERO}' \
+ || U'\u0010' != U'\N{DATA LINK ESCAPE}' \
+ || U'\u0011' != U'\N{DEVICE CONTROL ONE}' \
+ || U'\u0012' != U'\N{DEVICE CONTROL TWO}' \
+ || U'\u0013' != U'\N{DEVICE CONTROL THREE}' \
+ || U'\u0014' != U'\N{DEVICE CONTROL FOUR}' \
+ || U'\u0015' != U'\N{NEGATIVE ACKNOWLEDGE}' \
+ || U'\u0016' != U'\N{SYNCHRONOUS IDLE}' \
+ || U'\u0017' != U'\N{END OF TRANSMISSION BLOCK}' \
+ || U'\u0018' != U'\N{CANCEL}' \
+ || U'\u0019' != U'\N{END OF MEDIUM}' \
+ || U'\u001A' != U'\N{SUBSTITUTE}' \
+ || U'\u001B' != U'\N{ESCAPE}' \
+ || U'\u001C' != U'\N{INFORMATION SEPARATOR FOUR}' \
+ || U'\u001C' != U'\N{FILE SEPARATOR}' \
+ || U'\u001D' != U'\N{INFORMATION SEPARATOR THREE}' \
+ || U'\u001D' != U'\N{GROUP SEPARATOR}' \
+ || U'\u001E' != U'\N{INFORMATION SEPARATOR TWO}' \
+ || U'\u001E' != U'\N{RECORD SEPARATOR}' \
+ || U'\u001F' != U'\N{INFORMATION SEPARATOR ONE}' \
+ || U'\u001F' != U'\N{UNIT SEPARATOR}' \
+ || U'\u007F' != U'\N{DELETE}' \
+ || U'\u0082' != U'\N{BREAK PERMITTED HERE}' \
+ || U'\u0083' != U'\N{NO BREAK HERE}' \
+ || U'\u0084' != U'\N{INDEX}' \
+ || U'\u0085' != U'\N{NEXT LINE}' \
+ || U'\u0086' != U'\N{START OF SELECTED AREA}' \
+ || U'\u0087' != U'\N{END OF SELECTED AREA}' \
+ || U'\u0088' != U'\N{CHARACTER TABULATION SET}' \
+ || U'\u0088' != U'\N{HORIZONTAL TABULATION SET}' \
+ || U'\u0089' != U'\N{CHARACTER TABULATION WITH JUSTIFICATION}' \
+ || U'\u0089' != U'\N{HORIZONTAL TABULATION WITH JUSTIFICATION}' \
+ || U'\u008A' != U'\N{LINE TABULATION SET}' \
+ || U'\u008A' != U'\N{VERTICAL TABULATION SET}' \
+ || U'\u008B' != U'\N{PARTIAL LINE FORWARD}' \
+ || U'\u008B' != U'\N{PARTIAL LINE DOWN}' \
+ || U'\u008C' != U'\N{PARTIAL LINE BACKWARD}' \
+ || U'\u008C' != U'\N{PARTIAL LINE UP}' \
+ || U'\u008D' != U'\N{REVERSE LINE FEED}' \
+ || U'\u008D' != U'\N{REVERSE INDEX}' \
+ || U'\u008E' != U'\N{SINGLE SHIFT TWO}' \
+ || U'\u008E' != U'\N{SINGLE-SHIFT-2}' \
+ || U'\u008F' != U'\N{SINGLE SHIFT THREE}' \
+ || U'\u008F' != U'\N{SINGLE-SHIFT-3}' \
+ || U'\u0090' != U'\N{DEVICE CONTROL STRING}' \
+ || U'\u0091' != U'\N{PRIVATE USE ONE}' \
+ || U'\u0091' != U'\N{PRIVATE USE-1}' \
+ || U'\u0092' != U'\N{PRIVATE USE TWO}' \
+ || U'\u0092' != U'\N{PRIVATE USE-2}' \
+ || U'\u0093' != U'\N{SET TRANSMIT STATE}' \
+ || U'\u0094' != U'\N{CANCEL CHARACTER}' \
+ || U'\u0095' != U'\N{MESSAGE WAITING}' \
+ || U'\u0096' != U'\N{START OF GUARDED AREA}' \
+ || U'\u0096' != U'\N{START OF PROTECTED AREA}' \
+ || U'\u0097' != U'\N{END OF GUARDED AREA}' \
+ || U'\u0097' != U'\N{END OF PROTECTED AREA}' \
+ || U'\u0098' != U'\N{START OF STRING}' \
+ || U'\u009A' != U'\N{SINGLE CHARACTER INTRODUCER}' \
+ || U'\u009B' != U'\N{CONTROL SEQUENCE INTRODUCER}' \
+ || U'\u009C' != U'\N{STRING TERMINATOR}' \
+ || U'\u009D' != U'\N{OPERATING SYSTEM COMMAND}' \
+ || U'\u009E' != U'\N{PRIVACY MESSAGE}' \
+ || U'\u009F' != U'\N{APPLICATION PROGRAM COMMAND}' \
+ || U'\u0020' != U'\N{SPACE}' \
+ || U'\u0030' != U'\N{DIGIT ZERO}' \
+ || U'\u0053' != U'\N{LATIN CAPITAL LETTER S}'
+#error Bad
+#endif
+#endif
+#if U'\U0001F402' != U'\N{OX}' \
+ || U'\U0001FBA9' != U'\N{BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT AND MIDDLE LEFT TO LOWER CENTRE}' \
+ || U'\u01FD' != U'\N{LATIN SMALL LETTER AE WITH ACUTE}' \
+ || U'\u2118' != U'\N{WEIERSTRASS ELLIPTIC FUNCTION}' \
+ || U'\u2118' != U'\N{SCRIPT CAPITAL P}' \
+ || U'\uFEFF' != U'\N{BYTE ORDER MARK}' \
+ || U'\uFEFF' != U'\N{ZERO WIDTH NO-BREAK SPACE}' \
+ || U'\u116C' != U'\N{HANGUL JUNGSEONG OE}' \
+ || U'\u1180' != U'\N{HANGUL JUNGSEONG O-E}' \
+ || U'\u0F60' != U'\N{TIBETAN LETTER -A}' \
+ || U'\u0F68' != U'\N{TIBETAN LETTER A}' \
+ || U'\u0F0A' != U'\N{TIBETAN MARK BKA- SHOG YIG MGO}' \
+ || U'\u0FD0' != U'\N{TIBETAN MARK BKA- SHOG GI MGO RGYAN}' \
+ || U'\u0FD0' != U'\N{TIBETAN MARK BSKA- SHOG GI MGO RGYAN}' \
+ || U'\uFE18' != U'\N{PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET}' \
+ || U'\uFE18' != U'\N{PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRACKET}' \
+ || U'\uAC00' != U'\N{HANGUL SYLLABLE GA}' \
+ || U'\uAC02' != U'\N{HANGUL SYLLABLE GAGG}' \
+ || U'\uAD8D' != U'\N{HANGUL SYLLABLE GWEONJ}' \
+ || U'\uAE4D' != U'\N{HANGUL SYLLABLE GGAG}' \
+ || U'\uAE4E' != U'\N{HANGUL SYLLABLE GGAGG}' \
+ || U'\uC544' != U'\N{HANGUL SYLLABLE A}' \
+ || U'\uC55F' != U'\N{HANGUL SYLLABLE AH}' \
+ || U'\uC560' != U'\N{HANGUL SYLLABLE AE}' \
+ || U'\uD7A3' != U'\N{HANGUL SYLLABLE HIH}' \
+ || U'\u3400' != U'\N{CJK UNIFIED IDEOGRAPH-3400}' \
+ || U'\u4DBF' != U'\N{CJK UNIFIED IDEOGRAPH-4DBF}' \
+ || U'\u4E00' != U'\N{CJK UNIFIED IDEOGRAPH-4E00}' \
+ || U'\u9FFC' != U'\N{CJK UNIFIED IDEOGRAPH-9FFC}' \
+ || U'\U00020000' != U'\N{CJK UNIFIED IDEOGRAPH-20000}' \
+ || U'\U0002A6DD' != U'\N{CJK UNIFIED IDEOGRAPH-2A6DD}' \
+ || U'\U00020700' != U'\N{CJK UNIFIED IDEOGRAPH-20700}' \
+ || U'\U0002B734' != U'\N{CJK UNIFIED IDEOGRAPH-2B734}' \
+ || U'\U0002B740' != U'\N{CJK UNIFIED IDEOGRAPH-2B740}' \
+ || U'\U0002B81D' != U'\N{CJK UNIFIED IDEOGRAPH-2B81D}' \
+ || U'\U0002B820' != U'\N{CJK UNIFIED IDEOGRAPH-2B820}' \
+ || U'\U0002CEA1' != U'\N{CJK UNIFIED IDEOGRAPH-2CEA1}' \
+ || U'\U0002CEB0' != U'\N{CJK UNIFIED IDEOGRAPH-2CEB0}' \
+ || U'\U0002EBE0' != U'\N{CJK UNIFIED IDEOGRAPH-2EBE0}' \
+ || U'\U00030000' != U'\N{CJK UNIFIED IDEOGRAPH-30000}' \
+ || U'\U0003134A' != U'\N{CJK UNIFIED IDEOGRAPH-3134A}' \
+ || U'\U00017000' != U'\N{TANGUT IDEOGRAPH-17000}' \
+ || U'\U000187F7' != U'\N{TANGUT IDEOGRAPH-187F7}' \
+ || U'\U00018D00' != U'\N{TANGUT IDEOGRAPH-18D00}' \
+ || U'\U00018D08' != U'\N{TANGUT IDEOGRAPH-18D08}' \
+ || U'\U00018B00' != U'\N{KHITAN SMALL SCRIPT CHARACTER-18B00}' \
+ || U'\U00018CD5' != U'\N{KHITAN SMALL SCRIPT CHARACTER-18CD5}' \
+ || U'\U0001B170' != U'\N{NUSHU CHARACTER-1B170}' \
+ || U'\U0001B2FB' != U'\N{NUSHU CHARACTER-1B2FB}' \
+ || U'\uF900' != U'\N{CJK COMPATIBILITY IDEOGRAPH-F900}' \
+ || U'\uFA6D' != U'\N{CJK COMPATIBILITY IDEOGRAPH-FA6D}' \
+ || U'\uFA70' != U'\N{CJK COMPATIBILITY IDEOGRAPH-FA70}' \
+ || U'\uFAD9' != U'\N{CJK COMPATIBILITY IDEOGRAPH-FAD9}' \
+ || U'\U0002F800' != U'\N{CJK COMPATIBILITY IDEOGRAPH-2F800}' \
+ || U'\U0002FA1D' != U'\N{CJK COMPATIBILITY IDEOGRAPH-2FA1D}'
+#error Bad
+#endif
+
+const char32_t *a = U"\N{HEBREW LETTER KAF}\N{HEBREW LETTER FINAL NUN}";
+const char32_t *b = U"\N{OX}\N{BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT AND MIDDLE LEFT TO LOWER CENTRE}";
+
+#define b\N{LATIN SMALL LETTER O WITH ACUTE}x U'\U0001FBA9'
+
+int
+main ()
+{
+ if (a[0] != U'\u05DB' || a[1] != U'\U000005DF' || a[2]
+ || b[0] != U'\U0001F402' || b[1] != b\u{f3}x || b[2])
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-2.c b/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-2.c
new file mode 100644
index 0000000..4b1af84
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-2.c
@@ -0,0 +1,18 @@
+/* P2071R2 - Named universal character escapes */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99 -Wno-c++-compat" { target c } } */
+/* { dg-options "-std=c++23" { target c++ } } */
+
+int jalape\N{LATIN SMALL LETTER N WITH TILDE}o = 42;
+
+int
+caf\N{LATIN SMALL LETTER E WITH ACUTE} (void)
+{
+ return jalape\u00F1o;
+}
+
+int
+test (void)
+{
+ return caf\u00e9 ();
+}
diff --git a/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-3.c b/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-3.c
new file mode 100644
index 0000000..5985c03
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-3.c
@@ -0,0 +1,22 @@
+/* P2071R2 - Named universal character escapes */
+/* { dg-do compile } */
+/* { dg-require-effective-target wchar } */
+/* { dg-options "-std=gnu99 -Wno-c++-compat" { target c } } */
+/* { dg-options "-std=c++23" { target c++ } } */
+
+#ifndef __cplusplus
+typedef __CHAR32_TYPE__ char32_t;
+#endif
+
+const char32_t *a = U"\N{}"; /* { dg-error "empty named universal character escape sequence" } */
+const char32_t *b = U"\N{NU" "LL}"; /* { dg-error "'\\\\N\\{' not terminated with '\\}' after" } */
+ /* { dg-error "is not a valid universal character" "" { target c } .-1 } */
+const char32_t *c = U"\N{ I've just made it up }"; /* { dg-error "'\\\\N\\{' not terminated with '\\}' after" } */
+ /* { dg-error "is not a valid universal character" "" { target c } .-1 } */
+const char32_t *d = U"\N{_________ _______}"; /* { dg-error "is not a valid universal character" } */
+const char32_t *e = U"\N{O.X}"; /* { dg-error "'\\\\N\\{' not terminated with '\\}' after" } */
+ /* { dg-error "is not a valid universal character" "" { target c } .-1 } */
+const char32_t *f = U"\N{.}"; /* { dg-error "'\\\\N\\{' not terminated with '\\}' after" } */
+ /* { dg-error "is not a valid universal character" "" { target c } .-1 } */
+const char32_t *g = U"\N{BOM}"; /* { dg-error "is not a valid universal character" } */
+const char32_t *h = U"\N{ZWNBSP}"; /* { dg-error "is not a valid universal character" } */
diff --git a/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-4.c b/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-4.c
new file mode 100644
index 0000000..75fdeff
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-4.c
@@ -0,0 +1,60 @@
+/* P2071R2 - Named universal character escapes */
+/* { dg-do compile } */
+/* { dg-require-effective-target wchar } */
+/* { dg-options "-std=gnu99 -Wno-c++-compat" { target c } } */
+/* { dg-options "-std=c++23" { target c++ } } */
+
+#ifndef __cplusplus
+typedef __CHAR32_TYPE__ char32_t;
+#endif
+
+const char32_t *a = U"\N{ZERO WIDTH NO BREAK SPACE}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{ZERO WIDTH NO-BREAK SPACE\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *b = U"\N{giraffe face}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{GIRAFFE FACE\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *c = U"\N{Giraffe Face}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{GIRAFFE FACE\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *d = U"\N{ GiRaFfE_fAcE__ ___}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{GIRAFFE FACE\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *e = U"\N{GIRAFFE}"; /* { dg-error "is not a valid universal character" } */
+const char32_t *f = U"\N{Hangul_Syllable_gAgg_}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{HANGUL SYLLABLE GAGG\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *g = U"\N{HANGUL SYLLABLE gagg}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{HANGUL SYLLABLE GAGG\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *h = U"\N{HANGULSYLLABLEGAGG}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{HANGUL SYLLABLE GAGG\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *i = U"\N{HANGUL_SYLLABLE_GAGG}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{HANGUL SYLLABLE GAGG\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *j = U"\N{HANGUL SYLLABLE }"; /* { dg-error "is not a valid universal character" } */
+const char32_t *k = U"\N{CJK-COMPATIBILITY-IDEOGRAPH-2F801}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{CJK COMPATIBILITY IDEOGRAPH-2F801\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *l = U"\N{CjK_COMPATIBILITY IDEOGRAPH 2f801}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{CJK COMPATIBILITY IDEOGRAPH-2F801\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *m = U"\N{CjK_COMPATIBILITY IDEOGRAPH 2f80}"; /* { dg-error "is not a valid universal character" } */
+const char32_t *n = U"\N{CJK COMPATIBILITY IDEOGRAPH-}"; /* { dg-error "is not a valid universal character" } */
+const char32_t *o = U"\N{CJK COMPATIBILITY IDEOGRAPH-X}"; /* { dg-error "is not a valid universal character" } */
+const char32_t *p = U"\N{Tibetan Letter A}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{TIBETAN LETTER A\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *q = U"\N{Tibetan LetterA}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{TIBETAN LETTER A\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *r = U"\N{Tibetan Letter-A}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{TIBETAN LETTER A\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *s = U"\N{Tibetan Letter -A}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{TIBETAN LETTER -A\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *t = U"\N{TibetanLetter -A}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{TIBETAN LETTER -A\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *u = U"\N{Hangul Jungseong oe}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG OE\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *v = U"\N{Hangul Jungseong o- e}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG O-E\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *w = U"\N{HangulJungseongo-e}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG O-E\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *x = U"\N{Hangul Jungseong oe __ }"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG OE\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *y = U"\N{Hangul Jungseong o- e __ }"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG O-E\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *z = U"\N{Hangul Jungseong o -e}"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG O-E\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *A = U"\N{Hangul Jungseong o -e __ }"; /* { dg-error "is not a valid universal character" } */
+ /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG O-E\\}\\?" "" { target *-*-* } .-1 } */
+const char32_t *B = U"\N{O}"; /* { dg-error "is not a valid universal character" } */