aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/expr.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-03-23 00:01:48 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-03-23 00:01:48 +0000
commite08a8f45f515854210dc47d78e13302536d2fc35 (patch)
treef11d1b07e9ec203859528a02af06b002e362a896 /gcc/cp/expr.c
parentedebba7aaef2d4af34267d0a52ebd6f57c5a28b3 (diff)
downloadgcc-e08a8f45f515854210dc47d78e13302536d2fc35.zip
gcc-e08a8f45f515854210dc47d78e13302536d2fc35.tar.gz
gcc-e08a8f45f515854210dc47d78e13302536d2fc35.tar.bz2
cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
* cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG. Document internals of pointer-to-member-functions. (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc. (PFN_FROM_PTRMEMFUNC): Similarly. (build_type_conversion): Remove unused parameter. (build_ptrmemfunc1): Declare. (expand_ptrmemfunc_cst): New function. (delta2_from_ptrmemfunc): Likewise. (pfn_from_ptrmemfunc): Likewise. * cvt.c (cp_convert_to_pointer): Remove unused parameter to build_type_conversion. Use TYPE_PTRMEM_P for readability. (convert_to_reference): Remove unused parameter to build_type_conversion. (ocp_convert): Likewise. (build_user_type_conversion): Likewise. * error.c (dump_expr): Handle NULL pointer-to-member functions. * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions. * method.c (build_overload_value): Don't go splitting CONSTRUCTORs open when handling pointer-to-member functions. * pt.c (convert_nontype_argument): Clean up error messages. Be more stringent with pointers-to-members. * typeck.c (build_ptrmemfunc1): Don't declare. Make it global. (build_unary_op): Tidy ever-so-slightly. (build_conditional_expr): Remove extra parameter to build_type_conversion. (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function we're using. (expand_ptrmemfunc_cst): Define. (delta2_from_ptrmemfunc): Likewise. (pfn_from_ptrmemfunc): Likewise. From-SVN: r25913
Diffstat (limited to 'gcc/cp/expr.c')
-rw-r--r--gcc/cp/expr.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c
index 3dc8eae..22dd075 100644
--- a/gcc/cp/expr.c
+++ b/gcc/cp/expr.c
@@ -188,10 +188,16 @@ cplus_expand_expr (exp, target, tmode, modifier)
}
else
{
- /* We don't yet handle pointer-to-member functions this
- way. */
- my_friendly_abort (0);
- return 0;
+ tree delta;
+ tree idx;
+ tree pfn;
+ tree delta2;
+
+ expand_ptrmemfunc_cst (exp, &delta, &idx, &pfn, &delta2);
+
+ return expand_expr (build_ptrmemfunc1 (type, delta, idx,
+ pfn, delta2),
+ target, tmode, modifier);
}
}