PR c++/49066
* decl.c (duplicate_decls): Preserve DECL_DELETED_FN.
From-SVN: r173993
2011-05-20 Jason Merrill <jason@redhat.com>
+ PR c++/49066
+ * decl.c (duplicate_decls): Preserve DECL_DELETED_FN.
+
PR c++/48873
* tree.c (stabilize_expr): Fix typo.
error ("deleted definition of %qD", newdecl);
error ("after previous declaration %q+D", olddecl);
}
+ DECL_DELETED_FN (newdecl) |= DECL_DELETED_FN (olddecl);
}
/* Deal with C++: must preserve virtual function table size. */
2011-05-20 Jason Merrill <jason@redhat.com>
+ * g++.dg/cpp0x/defaulted26.C: New.
+
* g++.dg/cpp0x/noexcept02.C: Fix.
* g++.dg/cpp0x/noexcept03.C: Fix.
* g++.dg/cpp0x/noexcept08.C: Fix.
--- /dev/null
+// PR c++/49066
+// { dg-options -std=c++0x }
+
+void foo() = delete; // { dg-error "declared here" }
+void foo();
+
+int main() { foo(); } // { dg-error "deleted" }