Daily bump.
[official-gcc.git] / gcc / testsuite / g++.dg / ext / utf-dflt.C
blob6bf020f7cdb2734df19c480d4a6b27df8fb79c6a
1 /* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
2 /* Expected errors for char16_t/char32_t in default std. */
3 /* Ensure u8, u and U prefixes are parsed as separate tokens in default std. */
4 /* { dg-do compile } */
5 /* { dg-options "-std=c++98" } */
7 const static char16_t   c0      = 'a';  /* { dg-error "not name a type" } */
8 const static char32_t   c1      = 'a';  /* { dg-error "not name a type" } */
10 const unsigned short    c2      = u'a';         /* { dg-error "not declared" } */
11 const unsigned long     c3      = U'a';         /* { dg-error "not declared" } */
12 const unsigned char     c4      = u8'a';        /* { dg-error "not declared" } */
14 #define u       1 +
15 #define U       2 +
16 #define u8      3 +
18 const unsigned short    c5      = u'a';
19 const unsigned long     c6      = U'a';
20 const unsigned char     c7      = u8'a';
22 #undef u
23 #undef U
24 #undef u8
25 #define u       "a"
26 #define U       "b"
27 #define u8      "c"
29 const void              *s0     = u"a";
30 const void              *s1     = U"a";
31 const void              *s2     = u8"a";
33 int main () {}