1 /* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
2 /* Test the support for char16_t character constants. */
3 /* { dg-do run { target c++11 } } */
4 /* { dg-options "-Wall -Werror" } */
6 extern "C" void abort (void);
8 const static char16_t c0 = u'a';
9 const static char16_t c1 = u'\0';
10 const static char16_t c2 = u'\u0024';
11 const static char16_t c3 = u'\u2029';
12 const static char16_t c4 = u'\u8010';
14 const static char16_t c5 = 'a';
15 const static char16_t c6 = U'a';
16 const static char16_t c7 = U'\u2029';
17 const static char16_t c8 = U'\u8010';
18 const static char16_t c9 = L'a';
19 const static char16_t ca = L'\u2029';
20 const static char16_t cb = L'\u8010';
29 if (sizeof (u'a') != sizeof (char16_t))
31 if (sizeof (u'\0') != sizeof (char16_t))
33 if (sizeof (u'\u0024') != sizeof (char16_t))
35 if (sizeof (u'\u2029') != sizeof (char16_t))
37 if (sizeof (u'\u8010') != sizeof (char16_t))