diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2012-04-18 10:21:43 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2012-04-18 10:21:43 +0000 |
commit | 89fcabafa13d82c44c87b745d08de04386c5b15f (patch) | |
tree | dd9019ca2a1fa34c934ecc6915019c675d4e0b66 /gcc/cp/decl2.c | |
parent | 5932a4d411f30d1a07789f28528a2c57fb8e33e4 (diff) | |
download | gcc-89fcabafa13d82c44c87b745d08de04386c5b15f.zip gcc-89fcabafa13d82c44c87b745d08de04386c5b15f.tar.gz gcc-89fcabafa13d82c44c87b745d08de04386c5b15f.tar.bz2 |
re PR c++/52422 ([C++11][SFINAE] Hard errors with void or arithmetic expressions)
/cp
2012-04-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/52422
* cp-tree.h (build_addr_func, decay_conversion,
get_member_function_from_ptrfunc,
build_m_component_ref, convert_member_func_to_ptr):
Add tsubst_flags_t parameter.
* typeck.c (cp_default_conversion): Add.
(decay_conversion, default_conversion,
get_member_function_from_ptrfunc, convert_member_func_to_ptr):
Add tsubst_flags_t parameter and use it throughout.
(cp_build_indirect_ref, cp_build_array_ref,
cp_build_function_call_vec, convert_arguments, build_x_binary_op,
cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
build_const_cast_1, expand_ptrmemfunc_cst,
convert_for_initialization): Adjust.
* init.c (build_vec_init): Adjust.
* decl.c (grok_reference_init, get_atexit_node): Likewise.
* rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
* except.c (build_throw): Likewise.
* typeck2.c (build_x_arrow): Likewise.
(build_m_component_ref): Add tsubst_flags_t parameter and
use it throughout.
* pt.c (convert_nontype_argument): Adjust.
* semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
* decl2.c (build_offset_ref_call_from_tree): Likewise.
* call.c (build_addr_func): Add tsubst_flags_t parameter and
use it throughout.
(build_call_a, build_conditional_expr_1, build_new_op_1,
convert_like_real, convert_arg_to_ellipsis, build_over_call,
build_special_member_call): Adjust.
* cvt.c (cp_convert_to_pointer, force_rvalue,
build_expr_type_conversion): Likewise.
/testsuite
2012-04-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/52422
* g++.dg/cpp0x/sfinae33.C: New.
* g++.dg/cpp0x/sfinae34.C: Likewise.
From-SVN: r186565
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 90498ea..a190aee 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1,7 +1,7 @@ /* Process declarations and variables for C++ compiler. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, - 2011 Free Software Foundation, Inc. + 2011, 2012 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. @@ -4175,7 +4175,8 @@ build_offset_ref_call_from_tree (tree fn, VEC(tree,gc) **args) { tree object_addr = cp_build_addr_expr (object, tf_warning_or_error); fn = TREE_OPERAND (fn, 1); - fn = get_member_function_from_ptrfunc (&object_addr, fn); + fn = get_member_function_from_ptrfunc (&object_addr, fn, + tf_warning_or_error); VEC_safe_insert (tree, gc, *args, 0, object_addr); } |