This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11159] errornous warning in copy ctor with virtual inheritance
- From: "boris at kolpackov dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2003 14:52:33 -0000
- Subject: [Bug c++/11159] errornous warning in copy ctor with virtual inheritance
- References: <20030611190829.11159.boris@kolpackov.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11159
------- Additional Comments From boris@kolpackov.net 2003-06-17 14:52 -------
BTW, if you look at the original example you will notice that B and C are not
virtual bases of D. After trying the following example
struct A {};
struct B : A
{
B (B const&) {}
};
I got this:
bash-2.05a$ g++ -W -c ./copyctor.cpp
copyctor.cpp: In copy constructor `B::B(const V&)':
copyctor.cpp:20: warning: base class `struct A' should be explicitly
initialized in the copy constructor
So apparently it has nothing to do with virtual inheritance. Also I still
believe there is no ground to issue this warning.
-boris