2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / conversion5.C
blob0031084db004d4f8cadfd8436ec724e42ac71191
1 // { dg-do assemble  }
2 // { dg-options "-Wconversion" }
3 struct A { };
4 struct B: public A {
5   A a;
6   operator A () { return a; }   // { dg-warning "" } never used implicitly
7 };
8 void f (const A&);
9 void g()
11   B b;
12   (A) b; // { dg-bogus "" } trying both constructor and type conversion operator