blob: 2327428a0b5560adffbf39aaa5ff9f16ee33a8fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
// { dg-do compile }
// Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
// DR80: Class members with same name as class
struct A
{
int A;
};
struct A2
{
static int A2; // { dg-error "same name as" }
};
template <class>
struct A3
{
int A3;
};
template <class>
struct A4
{
static int A4; // { dg-error "same name as" }
};
struct B
{
B();
int B; // { dg-error "same name as" }
};
struct B2
{
B2();
static int B2; // { dg-error "same name as" }
};
template <class>
struct B3
{
B3();
int B3; // { dg-error "same name as" "this error should appear at parsing time" { xfail *-*-* } }
};
template <class>
struct B4
{
B4();
static int B4; // { dg-error "same name as" }
};
|