Commit c9043d03 by Volker Reichelt Committed by Volker Reichelt

re PR c++/25854 (Bogus diagnostic with '<type error>')

	PR c++/25854
	* pt.c (maybe_process_partial_specialization): Return early on
	error_mark_node.

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

From-SVN: r109975
parent 9795d9fd
2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/25854
* pt.c (maybe_process_partial_specialization): Return early on
error_mark_node.
2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/16829
* decl.c (start_preparsed_function): Check default arguments
unconditionally.
......
......@@ -678,8 +678,12 @@ check_explicit_instantiation_namespace (tree spec)
void
maybe_process_partial_specialization (tree type)
{
/* TYPE maybe an ERROR_MARK_NODE. */
tree context = TYPE_P (type) ? TYPE_CONTEXT (type) : NULL_TREE;
tree context;
if (type == error_mark_node)
return;
context = TYPE_CONTEXT (type);
if (CLASS_TYPE_P (type) && CLASSTYPE_USE_TEMPLATE (type))
{
......
2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/25854
* g++.dg/template/spec28.C: New test.
2006-01-19 Andrew Pinski <pinskia@physics.uc.edu>
* objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c (switchfiles):
// PR c++/25854
// Bad diagnostic
// { dg-do compile }
template<typename> struct A {}; // { dg-error "provided" }
template<> struct A<> {}; // { dg-error "wrong number" }
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