diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2010-07-13 11:47:58 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2010-07-13 11:47:58 +0000 |
commit | 135d47df2157e1f04f519f18e893b4fb68e3d341 (patch) | |
tree | f22cdbec5caa431704f8cc4c895d9644d5bf307c /gcc/cp/cvt.c | |
parent | 2eb0b984b67816b22c98b2287d7bd3cabf017b30 (diff) | |
download | gcc-135d47df2157e1f04f519f18e893b4fb68e3d341.zip gcc-135d47df2157e1f04f519f18e893b4fb68e3d341.tar.gz gcc-135d47df2157e1f04f519f18e893b4fb68e3d341.tar.bz2 |
re PR c++/44908 (SFINAE vs pointer to member via virtual base)
cp/
2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/44908
* call.c (convert_like_real): Adjust convert_ptrmem call, pass
complain argument.
* typeck.c (get_delta_difference): Update prototype, add a
tsubst_flags_t parameter; update get_delta_difference_1 calls and
add checks for error_mark_node.
(get_delta_difference_1): Update prototype, add a tsubst_flags_t
parameter; update lookup_base call.
(build_ptrmemfunc): Update prototype, add a tsubst_flags_t
parameter; update get_delta_difference call and add check for
error_mark_node.
(convert_ptrmem): Update prototype, add a tsubst_flags_t
parameter; update get_delta_difference call and add check for
error_mark_node; update build_ptrmemfunc call.
(build_static_cast_1): Adjust convert_ptrmem call.
(expand_ptrmemfunc_cst): Adjust get_delta_difference call.
(cp_build_unary_op): Adjust build_ptrmemfunc call.
* cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
and build_ptrmemfunc calls.
* cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
testsuite/
2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/44908
* g++.dg/template/sfinae21.C: New.
* g++.dg/template/sfinae22.C: Likewise.
From-SVN: r162138
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r-- | gcc/cp/cvt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 4fcba45..26c4442 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -176,7 +176,7 @@ cp_convert_to_pointer (tree type, tree expr) else if ((TYPE_PTRMEM_P (type) && TYPE_PTRMEM_P (intype)) || (TYPE_PTRMEMFUNC_P (type) && TYPE_PTRMEMFUNC_P (intype))) return convert_ptrmem (type, expr, /*allow_inverse_p=*/false, - /*c_cast_p=*/false); + /*c_cast_p=*/false, tf_warning_or_error); else if (TYPE_PTRMEMFUNC_P (intype)) { if (!warn_pmf2ptr) @@ -200,7 +200,7 @@ cp_convert_to_pointer (tree type, tree expr) { if (TYPE_PTRMEMFUNC_P (type)) return build_ptrmemfunc (TYPE_PTRMEMFUNC_FN_TYPE (type), expr, 0, - /*c_cast_p=*/false); + /*c_cast_p=*/false, tf_warning_or_error); if (TYPE_PTRMEM_P (type)) { @@ -1376,7 +1376,7 @@ convert_force (tree type, tree expr, int convtype) && TYPE_PTRMEMFUNC_P (type)) /* compatible pointer to member functions. */ return build_ptrmemfunc (TYPE_PTRMEMFUNC_FN_TYPE (type), e, 1, - /*c_cast_p=*/1); + /*c_cast_p=*/1, tf_warning_or_error); return ocp_convert (type, e, CONV_C_CAST|convtype, LOOKUP_NORMAL); } |