This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11159] erroneous warning in copy ctor with virtual inheritance
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Nov 2007 13:58:58 -0000
- Subject: [Bug c++/11159] erroneous warning in copy ctor with virtual inheritance
- References: <bug-11159-5779@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #14 from manu at gcc dot gnu dot org 2007-11-16 13:58 -------
(In reply to comment #13)
> Even the text of the warning is misleading. Why "should" it be explicitly
> initialised, when the standard says it will be implicitly initialised if a
> suitable default constructor exists?
>
> If you want to use a non-default constructor for the virtual base then you need
> to call it explicitly. But if the default constructor is what you want, why
> should you have to do extra work?
>
I wonder as well. Removing this warning will close at least two PRs...
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-12-11 23:10:09 |2007-11-16 13:58:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11159