Debian Codegraph @

gcc/testsuite/g++.dg/cpp/ucnid-2-utf8.C

raw
1 /* Test stringization of identifiers with extended characters works. */
2
3 /* Note: The results expected in these tests are what GCC currently
4 outputs, but they are not technically standard-conforming. If GCC is
5 changed in the future to produce the standard-conforming output, then
6 this test will fail and should be adjusted to check for UCNs in the
7 output rather than UTF-8. See PR 91755 for more details. */
8
9 /* { dg-do run } */
10
11 #include <stdlib.h>
12 #include <string.h>
13
14 #define h(s) #s
15 #define str(s) h(s)
16
17 int
18 main ()
19 {
20 if (strcmp (str (str (Á)), "\"Á\""))
21 abort ();
22 if (strcmp (str (str (Á)), "\"Á\""))
23 abort ();
24 }