2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / warn / conv1.C
blobd06cbd5863e2bcbc377dfa74f8dc7d9f48c3f97e
1 // { dg-do compile }
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 20 Apr 2003 <nathan@codesourcery.com>
6 // PR 10337, unneeded warning
8 class A {
9   public:
10   A() {}
13 class B : public A {
14   public:
15   B() {}
16   void operator=(const A& b) {}
17   void operator=(const B& b) {}
20 class C {
21   public:
22   C() {}
23   operator B &() { return _b; }
24   operator const B &() const { return _b; }
25   
26   B _b;
29 int main() {
30   B b;
31   C c;
32   b = c;