PR c++/63619
gcc/cp:
PR c++/63619
* decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
gcc/testsuite:
PR c++/63619
* g++.dg/warn/Wdelete-incomplete-3.C: New.
* g++.dg/warn/Wdelete-incomplete-4.C: New.
From-SVN: r216599
+2014-10-23 Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/63619
+ * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
+
2014-10-21 Paolo Carlini <paolo.carlini@oracle.com>
* parser.c (cp_parser_unary_expression): Add default arguments.
/* Deleting ptr to void is undefined behavior [expr.delete/3]. */
if (VOID_TYPE_P (TREE_TYPE (type)))
{
- warning (0, "deleting %qT is undefined", type);
+ warning (OPT_Wdelete_incomplete, "deleting %qT is undefined", type);
doing_vec = 0;
}
+2014-10-23 Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/63619
+ * g++.dg/warn/Wdelete-incomplete-3.C: New.
+ * g++.dg/warn/Wdelete-incomplete-4.C: New.
+
2014-10-23 Evgeny Stupachenko <evstupac@gmail.com>
PR target/63618
--- /dev/null
+// PR c++/63619
+
+int main() {
+ void* p;
+ delete p; // { dg-warning "undefined" }
+}
--- /dev/null
+// PR c++/63619
+// { dg-options -Wno-delete-incomplete }
+
+int main() {
+ void* p;
+ delete p;
+}