This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/7302] -Wnon-virtual-dtor should't complain of protected dtor
- 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 Mar 2007 15:30:21 -0000
- Subject: [Bug c++/7302] -Wnon-virtual-dtor should't complain of protected dtor
- References: <bug-7302-1037@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #18 from manu at gcc dot gnu dot org 2007-03-16 15:30 -------
(In reply to comment #17)
> Created an attachment (id=13214)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13214&action=view) [edit]
> extended patch against gcc-4.2
>
Hi Pawel,
if the bug exists in mainline, the patch should be against mainline (I think
this patch will apply to mainline anyway). The patch needs testcases, and it
should be sent to gcc-patches@gcc.gnu.org.
Also,
+ warning (0, "%q#T has virtual functions and accessible"
+ " non-virtual destructor", t)
should be:
+ warning (OPT_Wnon_virtual_dtor,
+ "%q#T has virtual functions and accessible"
+ " non-virtual destructor", t)
Also
+ || DECL_FRIENDLIST( TYPE_MAIN_DECL (t)))))))
should be
+ || DECL_FRIENDLIST (TYPE_MAIN_DECL (t)))))))
Thanks for the patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302