aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/conversion5.C
blob: 0031084db004d4f8cadfd8436ec724e42ac71191 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-do assemble  }
// { dg-options "-Wconversion" }
struct A { };
struct B: public A {
  A a;
  operator A () { return a; }	// { dg-warning "" } never used implicitly
};
void f (const A&);
void g()
{
  B b;
  (A) b; // { dg-bogus "" } trying both constructor and type conversion operator
}