Commit 684939ce by Paolo Carlini Committed by Paolo Carlini

re PR c++/31132 (ICE on inconsistent friend declaration)

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

	PR c++/31132
	* pt.c (tsubst_friend_function): When check_classfn
	returns error_mark_node likewise return it.

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

	PR c++/31132
	* g++.dg/template/crash69.C: New.

From-SVN: r127535
parent f0092c54
2007-08-16 Paolo Carlini <pcarlini@suse.de>
PR c++/31132
* pt.c (tsubst_friend_function): When check_classfn
returns error_mark_node likewise return it.
2007-08-15 Jakub Jelinek <jakub@redhat.com>
PR c++/32992
......
......@@ -6289,7 +6289,7 @@ tsubst_friend_function (tree decl, tree args)
tree fn = check_classfn (context,
new_friend, NULL_TREE);
if (fn && fn != error_mark_node)
if (fn)
new_friend = fn;
}
}
......
2007-08-16 Paolo Carlini <pcarlini@suse.de>
PR c++/31132
* g++.dg/template/crash69.C: New.
2007-08-15 Daniel Jacobowitz <dan@codesourcery.com>
* lib/target-supports.exp (check_effective_target_arm32): Use
// PR c++/31132
template<typename T> class A
{
static int i; // { dg-error "is private" }
friend int T::foo(); // { dg-error "does not match" }
};
struct B
{
void foo() { A<B>::i; } // { dg-error "within|candidate" }
};
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