gcc/testsuite/g++.dg/cpp/ucnid-3.C
raw| 1 | /* Test pasting of identifiers with UCNs preserves spelling. */ |
| 2 | /* { dg-do run } */ |
| 3 | |
| 4 | #include <stdlib.h> |
| 5 | #include <string.h> |
| 6 | |
| 7 | #define c(s1, s2) s1 ## s2 |
| 8 | #define h(s) #s |
| 9 | #define str(s) h(s) |
| 10 | |
| 11 | int |
| 12 | main () |
| 13 | { |
| 14 | if (strcmp (str (str (c (\u00c1, \u00C1))), "\"\\u00c1\\u00C1\"")) |
| 15 | abort (); |
| 16 | } |