annotate gcc/testsuite/g++.dg/cpp/ucn-1.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html
kono
parents:
diff changeset
2 // { dg-do compile { target c++11 } }
kono
parents:
diff changeset
3 // { dg-options "" }
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 int main()
kono
parents:
diff changeset
6 {
kono
parents:
diff changeset
7 "\u0041"; // 'A' UCN is OK in string literal
kono
parents:
diff changeset
8 '\u0041'; // also OK in character literal
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 int c\u0041c; // { dg-error "not valid in an identifier" }
kono
parents:
diff changeset
11 // $ is OK on most targets; not part of basic source char set
kono
parents:
diff changeset
12 int c\u0024c; // { dg-error "not valid in an identifier" "" { target { powerpc-ibm-aix* } } }
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 U"\uD800"; // { dg-error "not a valid universal character" }
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
15
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
16 U'\U00110000'; // { dg-warning "outside" "110000 outside UCS" { target c++2a } }
111
kono
parents:
diff changeset
17 }