annotate gcc/testsuite/gcc.dg/utf-dflt.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
kono
parents:
diff changeset
2 /* If not gnu99, the u and U prefixes should be parsed as separate tokens. */
kono
parents:
diff changeset
3 /* { dg-do compile } */
kono
parents:
diff changeset
4 /* { dg-options "-std=gnu89" } */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 const unsigned short c0 = u'a'; /* { dg-error "undeclared" "undeclared" } */
kono
parents:
diff changeset
7 /* { dg-error "expected ',' or ';'" "expected" { target *-*-* } .-1 } */
kono
parents:
diff changeset
8 const unsigned long c1 = U'a'; /* { dg-error "undeclared" "undeclared" } */
kono
parents:
diff changeset
9 /* { dg-error "expected ',' or ';'" "expected" { target *-*-* } .-1 } */
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 #define u 1 +
kono
parents:
diff changeset
12 #define U 2 +
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 const unsigned short c2 = u'a';
kono
parents:
diff changeset
15 const unsigned long c3 = U'a';
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 #undef u
kono
parents:
diff changeset
18 #undef U
kono
parents:
diff changeset
19 #define u "a"
kono
parents:
diff changeset
20 #define U "b"
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 const void *s0 = u"a";
kono
parents:
diff changeset
23 const void *s1 = U"a";
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 int main () {}