/cp
2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/62232
* class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
for final class types.
/testsuite
2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/62232
* g++.dg/cpp0x/Wdtor1.C: New.
From-SVN: r215351
+2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/62232
+ * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
+ for final class types.
+
2014-09-15 Jason Merrill <jason@redhat.com>
* pt.c (lookup_template_class_1): Splice out abi_tag attribute if
/* This warning does not make sense for Java classes, since they
cannot have destructors. */
if (!TYPE_FOR_JAVA (t) && warn_nonvdtor
- && TYPE_POLYMORPHIC_P (t) && accessible_nvdtor_p (t))
+ && TYPE_POLYMORPHIC_P (t) && accessible_nvdtor_p (t)
+ && !CLASSTYPE_FINAL (t))
warning (OPT_Wnon_virtual_dtor,
"%q#T has virtual functions and accessible"
" non-virtual destructor", t);
+2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/62232
+ * g++.dg/cpp0x/Wdtor1.C: New.
+
2014-09-18 Joseph Myers <joseph@codesourcery.com>
* gcc.dg/torture/float128-exact-underflow.c: New test.
--- /dev/null
+// PR c++/62232
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wnon-virtual-dtor" }
+
+class base
+{
+protected:
+ ~base () {}
+ virtual void foo (){};
+};
+class derive final : public base
+{
+};