summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/p807.C
blob: 7b343a50f4894126816e7bfd7d12e3e3d7ee7cf0 (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
// { dg-do assemble  }
// prms-id: 807

extern "C" int printf(const char*, ...);

class B;

class AX
{
 protected:
   int x;

 public:
   operator B();
};


class B
{
 private:
   int x;
 public:
   B(const AX&);
};


int foo(B& b);			// { dg-error "" } referenced below


int main()
{
   AX a;
   foo(a);  // { dg-error "" } Ambiguous B(a) or a.operator B()  //  See ARM 12.3.2

}