This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]