2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / overload14.C
blob2a50b1bf5104e9ed9ee29b70e738bd7bc319780b
1 // { dg-do run  }
2 // { dg-options "-Wconversion" }
3 extern "C" void abort();
5 struct A {
6   typedef double (&B);
7   typedef const double (&C);
9   A() { }
11   operator C () const;
12   operator B ();
15 static const double d = 2.0;
16 static double e = 3.0;
18 A::operator A::C () const
20   abort ();
21   return d;
24 A::operator A::B ()
26   return e;
29 int main ()
31   (A::C) A ();
32   return 0;