Commit 7b3ad9f9 by Jason Merrill Committed by Jason Merrill

re PR c++/37037 (ICE on template class member function definition after explicit…

re PR c++/37037 (ICE on template class member function definition after explicit template class instantation)

	PR c++/37037
	* decl.c (grokdeclarator): Don't generate a void PARM_DECL.

From-SVN: r154131
parent d6c057ab
2009-11-12 Jason Merrill <jason@redhat.com>
PR c++/37037
* decl.c (grokdeclarator): Don't generate a void PARM_DECL.
PR c++/42013
* call.c (build_conditional_expr): Check specifically for folding
to CALL_EXPR rather than TREE_SIDE_EFFECTS.
......
......@@ -8993,7 +8993,9 @@ grokdeclarator (const cp_declarator *declarator,
tree decls = NULL_TREE;
tree args;
for (args = TYPE_ARG_TYPES (type); args; args = TREE_CHAIN (args))
for (args = TYPE_ARG_TYPES (type);
args && args != void_list_node;
args = TREE_CHAIN (args))
{
tree decl = cp_build_parm_decl (NULL_TREE, TREE_VALUE (args));
......
2009-11-12 Jason Merrill <jason@redhat.com>
PR c++/37037
* g++.dg/template/typedef21.C: New.
PR c++/42013
* g++.dg/cpp0x/decltype19.C: New.
......
// PR c++/37037
typedef void F(void);
template <typename T> struct S
{
static F f;
};
template class S<int>;
template <class T> void S<T>::f(void)
{}
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