summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp/ucnid-2.C
blob: 2ffb3c97b18f0891b5147d232bfac272a52f506b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Test stringization of identifiers with UCNs preserves spelling.  */
/* { dg-do run } */

#include <stdlib.h>
#include <string.h>

#define h(s) #s
#define str(s) h(s)

int
main ()
{
  if (strcmp (str (str (\u00c1)), "\"\\u00c1\""))
    abort ();
  if (strcmp (str (str (\u00C1)), "\"\\u00C1\""))
    abort ();
}