This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR c++/5645 gcc warns that pure virtual class not explicitly initialized
- From: "Manuel López-Ibáñez" <lopezibanez at gmail dot com>
- To: "Jason Merrill" <jason at redhat dot com>
- Cc: "Mark Mitchell" <mark at codesourcery dot com>, "GCC Patches" <gcc-patches at gcc dot gnu dot org>, "Nathan Sidwell" <nathan at codesourcery dot com>
- Date: Wed, 13 Feb 2008 12:28:56 +0100
- Subject: Re: PR c++/5645 gcc warns that pure virtual class not explicitly initialized
- References: <6c33472e0710271010s2a6cc785w1524bbf39b9f607a@mail.gmail.com> <472E58AD.6040001@codesourcery.com> <6c33472e0711111603i33c203afx930e2eb3bd8c1be2@mail.gmail.com> <4738C0DA.80903@redhat.com> <6c33472e0711121627v3946f828s6c6bb9b1d25de6ef@mail.gmail.com> <47B1B3FB.3030502@redhat.com>
On 12/02/2008, Jason Merrill <jason@redhat.com> wrote:
> Manuel López-Ibáñez wrote:
> > On 12/11/2007, Jason Merrill <jason@redhat.com> wrote:
> >> I was suggesting that we check for any user-defined constructor.
> >
> > My question was: is there any function to find out that?
>
> There is now, TYPE_HAS_USER_CONSTRUCTOR.
>
I posted the following comment in PR 5645 [1]
Created an attachment (id=15136) [edit]
patch and testcases
This patch contains an attempt to implement the suggestions given here:
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00149.html
It also contains all testcases from PR 5645 and PR 11159.
The tests in g++.dg/warn/pr5645.C pass.
The tests in g++.dg/warn/pr11159.C fail.
The fundamental problem is that I don't understand what this warning is warning
about. And nobody seems to have a clear idea either.
Unless someone can put forward a clear definition that is justified for the
testcases above and provides new testcases (either positive or negative), I am
not going to work anymore on this (except if asked to remove the warning
altogether).
[1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5645#c9