Commit acccf788 by Mark Mitchell Committed by Mark Mitchell

re PR c++/17068 (ICE: tree check: expected class 'd', have 'x' (identifier_node)…

re PR c++/17068 (ICE: tree check: expected class 'd', have 'x' (identifier_node) in dependent_template_p, at cp/pt.c:12043)

	PR c++/17068
	* pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
	dependent.

	PR c++/17068
	* g++.dg/template/operator4.C: New test.

From-SVN: r86199
parent 50dc9a88
2004-08-18 Mark Mitchell <mark@codesourcery.com>
PR c++/17068
* pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
dependent.
2004-08-17 Mark Mitchell <mark@codesourcery.com>
PR c++/16246
......
......@@ -12033,8 +12033,9 @@ dependent_template_p (tree tmpl)
if (DECL_TEMPLATE_TEMPLATE_PARM_P (tmpl)
|| TREE_CODE (tmpl) == TEMPLATE_TEMPLATE_PARM)
return true;
/* So are qualified names that have not been looked up. */
if (TREE_CODE (tmpl) == SCOPE_REF)
/* So arenames that have not been looked up. */
if (TREE_CODE (tmpl) == SCOPE_REF
|| TREE_CODE (tmpl) == IDENTIFIER_NODE)
return true;
/* So are member templates of dependent classes. */
if (TYPE_P (CP_DECL_CONTEXT (tmpl)))
......
2004-08-18 Mark Mitchell <mark@codesourcery.com>
PR c++/17068
* g++.dg/template/operator4.C: New test.
2004-08-18 Richard Henderson <rth@redhat.com>
* gcc.dg/20040206-1.c: XFAIL.
......
// PR c++/17068
struct A
{
template<int> void operator()() {}
};
template<typename> void foo()
{
A().template operator()<0>();
}
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