Commit 0014c247 by Volker Reichelt Committed by Volker Reichelt

re PR c++/26739 (ICE in g++.old-deja/g++.pt/friend36.C)

	PR c++/26739
	* pt.c (tsubst_friend_function): Return early if
	pushdecl_namespace_level fails.

	* g++.old-deja/g++.pt/friend36.C: Adjust error markers.

From-SVN: r113090
parent b815a631
2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/26739
* pt.c (tsubst_friend_function): Return early if
pushdecl_namespace_level fails.
PR c++/26036
* typeck.c (convert_arguments): Return error_mark_node instead of
error_mark_list.
......
......@@ -5230,6 +5230,9 @@ tsubst_friend_function (tree decl, tree args)
old_decl = pushdecl_namespace_level (new_friend, /*is_friend=*/true);
pop_nested_namespace (ns);
if (old_decl == error_mark_node)
return error_mark_node;
if (old_decl != new_friend)
{
/* This new friend declaration matched an existing
......
2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/26739
* g++.old-deja/g++.pt/friend36.C: Adjust error markers.
PR c++/26036
* g++.dg/expr/call3.C: New test.
// { dg-do assemble }
template <class T>
void f(T) {} // { dg-error "" } previously defined here
void f(T) {} // { dg-error "previously" }
template <class U>
struct S {
template <class T>
friend void f(T) {} // { dg-error "" } redeclaration
friend void f(T) {} // { dg-error "redefinition" }
};
S<int> si;
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