re PR c/89525 (inform messages from -Wbuiltin-declaration-mismatch even with -w)
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.robertl / eb70.C
blobb17dc10dc0b4300e293d75bf93939af056c603f6
1 // { dg-do assemble  }
2 // conversion ops should be treated as coming from the most derived class
3 // for overload resolution.  See [over.match.funcs].
5 class X {
6 public:
7   operator bool() const;
8 };
10 class Y : public X {
11 private:
12   operator void*() const;
15 int f(Y const& y) {
16   return bool(y);