Commit 869fef88 by Jason Merrill Committed by Jason Merrill

re PR c++/40381 (Revision 142379 caused ICE with deleted functions)

	PR c++/40381
	* decl2.c (mark_used): Return after complaining about deleted fn.

From-SVN: r148319
parent dc2a6925
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
......
......@@ -3809,6 +3809,7 @@ mark_used (tree decl)
{
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.
......
// 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" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment