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 decls_match.
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 20 Jul 2006 22:47:13 -0700
- Subject: [lto] Use num_parm_types and nth_parm_type in decls_match.
Hi,
Tested on x86_64-pc-linux-gnu. Committed to the LTO branch as
obvious.
Kazu Hirata
2006-07-21 Kazu Hirata <kazu@codesourcery.com>
* decl.c (decls_match): Use num_parm_types and nth_parm_type.
Index: cp/decl.c
===================================================================
--- cp/decl.c (revision 115637)
+++ cp/decl.c (working copy)
@@ -957,7 +957,8 @@ decls_match (tree newdecl, tree olddecl)
))
{
types_match = self_promoting_args_p (p1);
- if (p1 == void_list_node)
+ if (num_parm_types (p1) == 1
+ && nth_parm_type (p1, 0) == void_type_node)
TREE_TYPE (newdecl) = TREE_TYPE (olddecl);
}
#ifndef NO_IMPLICIT_EXTERN_C