Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.mike/p807.C

raw
1 // { dg-do assemble }
2 // prms-id: 807
3
4 extern "C" int printf(const char*, ...);
5
6 class B;
7
8 class AX
9 {
10 protected:
11 int x;
12
13 public:
14 operator B();
15 };
16
17
18 class B
19 {
20 private:
21 int x;
22 public:
23 B(const AX&);
24 };
25
26
27 int foo(B& b); // { dg-message "" } referenced below
28
29
30 int main()
31 {
32 AX a;
33 foo(a); // { dg-error "" } Ambiguous B(a) or a.operator B() // See ARM 12.3.2
34
35 }