aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2009-11-12 17:49:59 -0500
committerJason Merrill <jason@gcc.gnu.org>2009-11-12 17:49:59 -0500
commit7b3ad9f90078038c6bce4b69d07653aec4d446a6 (patch)
tree00e43ca1f2df6e309c1df05e40f321323f973ef9 /gcc/cp
parentd6c057abd6a83513d4b6356314b8c5752a7025af (diff)
downloadgcc-7b3ad9f90078038c6bce4b69d07653aec4d446a6.zip
gcc-7b3ad9f90078038c6bce4b69d07653aec4d446a6.tar.gz
gcc-7b3ad9f90078038c6bce4b69d07653aec4d446a6.tar.bz2
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
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/decl.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e0b5f27..333c84d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
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.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 5e2f85f..e23634f 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -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));