PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
[official-gcc.git] / gcc / testsuite / g++.dg / tc1 / dr80.C
blob2327428a0b5560adffbf39aaa5ff9f16ee33a8fe
1 // { dg-do compile }
2 // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3 // DR80: Class members with same name as class 
5 struct A 
7   int A;
8 };
10 struct A2
12   static int A2;  // { dg-error "same name as" }
16 template <class>
17 struct A3
19   int A3;
22 template <class>
23 struct A4
25   static int A4;  // { dg-error "same name as" }
29 struct B
31   B();
32   int B;  // { dg-error "same name as" }
35 struct B2
37   B2();
38   static int B2;  // { dg-error "same name as" }
41 template <class>
42 struct B3
44   B3();
45   int B3;  // { dg-error "same name as" "this error should appear at parsing time" { xfail *-*-* } }
48 template <class>
49 struct B4
51   B4();
52   static int B4;  // { dg-error "same name as" }