Commit 7c60008e by Volker Reichelt Committed by Volker Reichelt

re PR c++/27559 (ICE on templated operator new)

	PR c++/27559
	* pt.c (push_template_decl_real): Return error_mark_node instead
	of broken decl.

	* g++.dg/template/new4.C: New test.

From-SVN: r113777
parent dca56f77
2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27559
* pt.c (push_template_decl_real): Return error_mark_node instead
of broken decl.
PR c++/27496
* pt.c (tsubst_friend_class): Return early on invalid friend
declarations.
......
......@@ -3009,7 +3009,7 @@ push_template_decl_real (tree decl, bool is_friend)
template. ... Template allocation functions shall
have two or more parameters. */
error ("invalid template declaration of %qD", decl);
return decl;
return error_mark_node;
}
}
else if (DECL_IMPLICIT_TYPEDEF_P (decl)
......
2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27559
* g++.dg/template/new4.C: New test.
PR c++/27496
* g++.dg/template/void2.C: New test.
// PR c++/27559
// { dg-do compile }
struct A
{
template<typename T>
static void* operator new(T) {} // { dg-error "first parameter|invalid template" }
};
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