This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11159] errornous warning in copy ctor with virtual inheritance


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]