Commit ddb45080 by Mark Mitchell Committed by Mark Mitchell

re PR c++/6949 (ICE in tsubst_decl, at cp/pt.c:5733)

	PR c++/6949
	* decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
	classes.

	PR c++/6949
	* g++.dg/template/local3.C: New test.

From-SVN: r68818
parent f9f4d1e1
2003-07-01 Mark Mitchell <mark@codesourcery.com>
PR c++/6949
* decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
classes.
2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* error.c (locate_error): %P takes an `int', not a `tree'.
......
......@@ -970,7 +970,7 @@ grokfield (tree declarator, tree declspecs, tree init, tree asmspec_tree,
}
}
if (processing_template_decl && ! current_function_decl
if (processing_template_decl
&& (TREE_CODE (value) == VAR_DECL || TREE_CODE (value) == FUNCTION_DECL))
value = push_template_decl (value);
......
2003-07-01 Mark Mitchell <mark@codesourcery.com>
PR c++/6949
* g++.dg/template/local3.C: New test.
PR c++/11149
* g++.dg/lookup/scoped6.C: New test.
......
template<class T>
void f(const T&)
{
struct B {
void g (T);
};
B b;
};
void g()
{
f(42);
}
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