annotate gcc/testsuite/g++.dg/lookup/using29.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // { dg-do compile }
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 struct A
kono
parents:
diff changeset
4 {
kono
parents:
diff changeset
5 int i;
kono
parents:
diff changeset
6 };
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 struct B
kono
parents:
diff changeset
9 {
kono
parents:
diff changeset
10 int i;
kono
parents:
diff changeset
11 };
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 struct C : A, B
kono
parents:
diff changeset
14 {
kono
parents:
diff changeset
15 using A::i; // { dg-message "previous" }
kono
parents:
diff changeset
16 using B::i; // { dg-error "redeclaration" }
kono
parents:
diff changeset
17 };
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 struct E
kono
parents:
diff changeset
20 {
kono
parents:
diff changeset
21 typedef int type;
kono
parents:
diff changeset
22 };
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 struct F
kono
parents:
diff changeset
25 {
kono
parents:
diff changeset
26 typedef int type;
kono
parents:
diff changeset
27 };
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 struct G : E, F
kono
parents:
diff changeset
30 {
kono
parents:
diff changeset
31 using E::type; // { dg-message "previous" }
kono
parents:
diff changeset
32 using F::type; // { dg-error "redeclaration" }
kono
parents:
diff changeset
33 };
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 struct H
kono
parents:
diff changeset
36 {
kono
parents:
diff changeset
37 typedef int type;
kono
parents:
diff changeset
38 };
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 struct I : H
kono
parents:
diff changeset
41 {
kono
parents:
diff changeset
42 typedef int type; // { dg-message "previous" }
kono
parents:
diff changeset
43 using H::type; // { dg-error "conflicts" }
kono
parents:
diff changeset
44 };
kono
parents:
diff changeset
45
kono
parents:
diff changeset
46 struct I2 : H
kono
parents:
diff changeset
47 {
kono
parents:
diff changeset
48 using H::type; // { dg-message "previous" }
kono
parents:
diff changeset
49 typedef int type; // { dg-error "conflicts" }
kono
parents:
diff changeset
50 };
kono
parents:
diff changeset
51
kono
parents:
diff changeset
52 struct J
kono
parents:
diff changeset
53 {
kono
parents:
diff changeset
54 struct type {};
kono
parents:
diff changeset
55 };
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 struct K : J
kono
parents:
diff changeset
58 {
kono
parents:
diff changeset
59 struct type {}; // { dg-message "previous" }
kono
parents:
diff changeset
60 using J::type; // { dg-error "conflicts" }
kono
parents:
diff changeset
61 };
kono
parents:
diff changeset
62
kono
parents:
diff changeset
63 struct L : J
kono
parents:
diff changeset
64 {
kono
parents:
diff changeset
65 using J::type; // { dg-message "previous" }
kono
parents:
diff changeset
66 struct type {}; // { dg-error "conflicts" }
kono
parents:
diff changeset
67 };
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 struct M
kono
parents:
diff changeset
70 {
kono
parents:
diff changeset
71 typedef int type;
kono
parents:
diff changeset
72 struct type2 {};
kono
parents:
diff changeset
73 };
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 struct N : M
kono
parents:
diff changeset
76 {
kono
parents:
diff changeset
77 using M::type; // { dg-message "previous" }
kono
parents:
diff changeset
78 using M::type; // { dg-error "redeclaration" }
kono
parents:
diff changeset
79 using M::type2; // { dg-message "previous" }
kono
parents:
diff changeset
80 using M::type2; // { dg-error "redeclaration" }
kono
parents:
diff changeset
81 };