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