[Bug c++/11159] errornous warning in copy ctor with virtual inheritance
boris@kolpackov.net
gcc-bugzilla@gcc.gnu.org
Tue Jun 17 14:52:00 GMT 2003
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
More information about the Gcc-bugs
mailing list