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++/7302] -Wnon-virtual-dtor should't complain of protected dtor



------- 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


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