diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-06 17:03:08 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-06 17:03:08 +0000 |
commit | a8d966c12c970e66dc9b22bd9c7765cd12783214 (patch) | |
tree | 0bea53352609d3a6f12f4add666223863889cc00 /gcc/cp/call.c | |
parent | 5ba08e2d2d27ea241c3167a82ecc85759db4cf11 (diff) | |
download | gcc-a8d966c12c970e66dc9b22bd9c7765cd12783214.tar.gz |
introduce {class,type}_of_this_parm functions
* cp-tree.h (type_of_this_parm, class_of_this_parm): New functions.
* call.c (standard_conversion): Call class_of_this_parm.
* cxx-pretty-print.c (pp_cxx_implicit_parameter_type): Likewise.
(pp_cxx_direct_abstract_declarator): Likewise.
* decl2.c (change_return_type): Likewise.
(cp_reconstruct_complex_type): Likewise.
* error.c (dump_type_suffix, dump_function_decl): Likewise.
* mangle.c (write_function_type): Likewise.
* pt.c (unify): Likewise.
* typeck.c (merge_types, type_memfn_quals): Likewise.
* decl.c (build_this_parm): Call type_of_this_parm.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173496 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index f5bd521ddaa..3a71572b67d 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -1146,8 +1146,8 @@ standard_conversion (tree to, tree from, tree expr, bool c_cast_p, { 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 = class_of_this_parm (fromfn); + tree tbase = class_of_this_parm (tofn); if (!DERIVED_FROM_P (fbase, tbase) || !same_type_p (TREE_TYPE (fromfn), TREE_TYPE (tofn)) |