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
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.
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;