Patchwork [wwwdocs] put -Wdelete-non-virtual-dtor in gcc-4.7/changes.html

login
register
mail settings
Submitter Jonathan Wakely
Date Nov. 19, 2011, 10:04 p.m.
Message ID <CAH6eHdRts8P=-m3DiHmBRHTFO5OR=PVAkk68y4oZywQnQLHKUw@mail.gmail.com>
Download mbox | patch
Permalink /patch/126621/
State New
Headers show

Comments

Jonathan Wakely - Nov. 19, 2011, 10:04 p.m.
Applied

Patch

Index: changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/changes.html,v
retrieving revision 1.60
diff -u -r1.60 changes.html
--- changes.html	19 Nov 2011 15:15:13 -0000	1.60
+++ changes.html	19 Nov 2011 22:02:48 -0000
@@ -312,6 +312,14 @@ 
 of types with non-trivial destructors, as they are already destroyed at end
 of full-expression; the change is that now the storage is released as
 well.</p></li>
+
+  <li>A new command-line option <code>-Wdelete-non-virtual-dtor</code>
+      has been added to warn when <code>delete</code> is used to destroy
+      an instance of a class which has virtual functions and non-virtual
+      destructor. It is unsafe to delete an instance of a derived class
+      through a pointer to a base class if the base class does not have a
+      virtual destructor.  This warning is enabled by <code>-Wall</code>.
+  </li>
 </ul>
   
   <h4>Runtime Library (libstdc++)</h4>