This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] Use nth_parm_type in standard_conversion.
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 27 Jun 2006 20:37:59 -0700
- Subject: [lto] Use nth_parm_type in standard_conversion.
Hi,
Tested on x86_64-pc-linux-gnu. Committed to the LTO branch as
obvious.
Kazu Hirata
2006-06-28 Kazu Hirata <kazu@codesourcery.com>
* call.c (standard_conversion): Use nth_parm_type.
Index: cp/call.c
===================================================================
--- cp/call.c (revision 114997)
+++ cp/call.c (working copy)
@@ -773,8 +773,8 @@ standard_conversion (tree to, tree from,
{
tree fromfn = TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (from));
tree tofn = TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (to));
- tree fbase = TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (fromfn)));
- tree tbase = TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (tofn)));
+ tree fbase = TREE_TYPE (nth_parm_type (TYPE_ARG_TYPES (fromfn), 0));
+ tree tbase = TREE_TYPE (nth_parm_type (TYPE_ARG_TYPES (tofn), 0));
if (!DERIVED_FROM_P (fbase, tbase)
|| !same_type_p (TREE_TYPE (fromfn), TREE_TYPE (tofn))