This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] Weffc++/Wnon-virtual-dtor confusion
- From: Nathan Sidwell <nathan at acm dot org>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Markus Trippelsdorf <markus at trippelsdorf dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 04 Apr 2014 18:33:30 +0100
- Subject: Re: [C++] Weffc++/Wnon-virtual-dtor confusion
- Authentication-results: sourceware.org; auth=none
- References: <533967BE dot 1020301 at acm dot org> <20140404163809 dot GA285 at x4> <533EE25D dot 9090406 at acm dot org> <20140404165430 dot GB285 at x4> <533EE635 dot 4090106 at acm dot org> <533EE9BB dot 2030202 at redhat dot com>
On 04/04/14 18:19, Jason Merrill wrote:
I also notice that the opt_storage destructor is implicitly declared and
trivial; it seems excessive to warn in that case.
I disagree, I think that's exactly a case that should be warned about -- because
it's easy to overlook.
I'm also somewhat skeptical
about extending the warning to non-polymorphic bases at all, at least in the
absence of -Weffc++.
That's certainly plausible.
Since this change is causing problems, I'm inclined to back it out until after
4.9 branches.
That too.
I'm testing a patch that makes the test in the loop:
if (TREE_PUBLIC (base_binfo)
&& (TYPE_POLYMORPHIC_P (basetype) || warn_ecpp)
&& accessible_nvdtor_p (basetype))
but I agree about reverting the patch if there's still further discussion
following that suggested change.
nathan