2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / bool7.C
blobdd1a6f2a4cd62d3ac2c3eb565da86fe5e120e025
1 // { dg-do assemble  }
3 struct A
5   operator bool () const;
6   operator const void * () const;
7 };
9 struct B
11   A a;
12   int foo1 ();
13   int foo2 ();
16 int
17 B::foo1 ()
19   return a ? 0 : 1;  // ambiguous default type conversion for `operator !='
22 int
23 B::foo2 ()
25   if (a)
26     return 0;
27   else
28     return 1;