summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/overload1.C
blob: 36f9cac468b4c0732e28cb531abed50ebedc38f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// { dg-do assemble  }
// Bug: g++ thinks there is a conversion from void * to B *.

struct A {
  operator void* ();
};

struct B: public A { };

void bar (A& a) {
  B* bp = (B*)a;		// { dg-error "" } 
}