Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.other / lookup19.C
blobd4104f0fca53bbd9f57e63144bafa7775d3a9a62
1 // { dg-do assemble  }
2 // Test for proper handling of type lookup for conversion operator names.
4 // Test 1: Only at file scope
5 typedef int B;
6 struct A
8   int B;
9   operator B *(); // { dg-error "" } 
12 A::operator B * () // { dg-error "" } 
14   return 0;
17 // Test 2: Only at class scope
18 struct C
20   typedef int D;
21   operator D *();
24 int D;
25 C::operator D * ()
27   return 0;
30 // Test 3: Matching
31 struct E
33   typedef int F;
34   operator F *();
37 typedef int F;
38 E::operator F * ()
40   return 0;
43 // Test 4: Conflicting
44 struct G
46   typedef int H;
47   operator H *();
50 typedef double H;
51 G::operator H * ()
53   return 0;