blob: 7f04de48378a4b399f1c39701bf5eec856b4ee85 [file] [log] [blame]
// { dg-do assemble }
// { dg-options "-Wconversion" }
struct A { };
struct B: public A {
A a;
operator A () { return a; } // { dg-warning "3:converting .B. to a base class .A. will never use a type conversion operator" }
};
void f (const A&);
void g()
{
B b;
(A) b; // { dg-bogus "" } trying both constructor and type conversion operator
}