Commit fa3546f1 by Paolo Carlini

re PR c++/27211 (Bogus error "template definition of non-template" when there is no non-template)

/cp
2007-08-14  Paolo Carlini  <pcarlini@suse.de>

	PR c++/27211
	* decl2.c (check_classfn): Return error_mark_node in case of error;
	in that case, do not call add_method.
	* decl.c (start_decl): Deal with check_classfn returning
	error_mark_node.
	(grokfndecl): Likewise.
	* pt.c (tsubst_friend_function): Likewise.

/testsuite
2007-08-14  Paolo Carlini  <pcarlini@suse.de>

	PR c++/27211
	* g++.dg/template/error27.C: New.
	* g++.dg/template/error28.C: New.
	* g++.dg/other/pr28304.C: Adjust.
	* g++.old-deja/g++.mike/p811.C: Likewise.

From-SVN: r127493
parent f8c3b097
...@@ -6287,7 +6287,7 @@ tsubst_friend_function (tree decl, tree args) ...@@ -6287,7 +6287,7 @@ tsubst_friend_function (tree decl, tree args)
tree fn = check_classfn (context, tree fn = check_classfn (context,
new_friend, NULL_TREE); new_friend, NULL_TREE);
if (fn) if (fn && fn != error_mark_node)
new_friend = fn; new_friend = fn;
} }
} }
......
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