This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] Use num_parm_types and nth_parm_type in grokdeclarator.
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 Jul 2006 06:56:05 -0700
- Subject: [lto] Use num_parm_types and nth_parm_type in grokdeclarator.
Hi,
Tested on x86_64-pc-linux-gnu. Committed to the LTO branch as
obvious.
Kazu Hirata
2006-07-26 Kazu Hirata <kazu@codesourcery.com>
* decl.c (grokdeclarator): Use num_parm_types and
nth_parm_type.
Index: cp/decl.c
===================================================================
--- cp/decl.c (revision 115758)
+++ cp/decl.c (working copy)
@@ -7608,7 +7608,8 @@ grokdeclarator (const cp_declarator *dec
if (inner_declarator
&& inner_declarator->kind == cdk_id
&& inner_declarator->u.id.sfk == sfk_destructor
- && arg_types != void_list_node)
+ && !(num_parm_types (arg_types) == 1
+ && nth_parm_type (arg_types, 0) == void_type_node))
{
error ("destructors may not have parameters");
arg_types = void_list_node;