PR c++/40381
* decl2.c (mark_used): Return after complaining about deleted fn.
From-SVN: r148319
+2009-06-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/40381
+ * decl2.c (mark_used): Return after complaining about deleted fn.
+
2009-06-08 Jason Merrill <jason@redhat.com>
* parser.c (cp_parser_type_id_1): 'auto' type is ok with a
{
error ("deleted function %q+D", decl);
error ("used here");
+ return;
}
/* If we don't need a value, then we don't need to synthesize DECL. */
if (skip_evaluation)
+2009-06-09 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/defaulted10.C: New.
+
2009-06-09 Martin Jambor <mjambor@suse.cz>
* testsuite/gcc.c-torture/compile/pr40351.c: New file.
--- /dev/null
+// PR c++/40381
+// { dg-options "-std=gnu++0x" }
+
+struct A
+{
+ template<typename T> void foo(T) = delete; // { dg-error "previously|deleted" }
+};
+
+template<typename T> void A::foo(T) {} // { dg-error "redefinition" }
+
+void bar()
+{
+ A().foo(0); // { dg-error "used" }
+}