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

Submitted by Jonathan Wakely on Nov. 19, 2011, 10:04 p.m.


Message ID CAH6eHdRts8P=-m3DiHmBRHTFO5OR=PVAkk68y4oZywQnQLHKUw@mail.gmail.com
State New
Headers show

Commit Message

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

Patch hide | download patch | download mbox

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
+  <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>
   <h4>Runtime Library (libstdc++)</h4>