diff options
author | Jason Merrill <jason@redhat.com> | 2011-04-26 15:28:25 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-04-26 15:28:25 -0400 |
commit | 574cfaa47dbcc2e8d9ea68b83d8dc3122832ff9b (patch) | |
tree | e83e77854b5490319145c8e64a21bec89b47616f /gcc/cp/semantics.c | |
parent | 5a87ca71c875b5bc34b9b8bc0ef405cec9b51b51 (diff) | |
download | gcc-574cfaa47dbcc2e8d9ea68b83d8dc3122832ff9b.zip gcc-574cfaa47dbcc2e8d9ea68b83d8dc3122832ff9b.tar.gz gcc-574cfaa47dbcc2e8d9ea68b83d8dc3122832ff9b.tar.bz2 |
re PR c++/48530 ([C++0x][SFINAE] Hard errors with deleted d'tors)
PR c++/48530
* decl.c (cxx_maybe_build_cleanup): Add complain parm.
* tree.c (force_target_expr): Add complain parm.
(build_target_expr_with_type): Likewise.
(get_target_expr_sfinae): Split out.
(build_vec_init_expr, bot_manip): Adjust.
* init.c (build_vec_delete, build_vec_delete_1): Add complain parm.
(build_delete, build_dtor_call): Likewise.
(perform_direct_initialization_if_possible): Adjust.
(build_vec_init): Handle error return.
* cvt.c (force_rvalue): Add complain parm.
Call build_special_member_call directly.
* decl2.c (delete_sanity): Add complain parm.
(build_cleanup): Adjust.
* pt.c (tsubst_copy_and_build, tsubst_expr): Adjust.
* semantics.c (finish_stmt_expr_expr): Adjust.
(finish_compound_literal): Adjust.
* parser.c (cp_parser_delete_expression): Adjust.
* typeck2.c (build_functional_cast): Adjust.
* cp-tree.h: Adjust.
From-SVN: r172985
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 62272aa..16fabb8 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1835,7 +1835,7 @@ finish_stmt_expr_expr (tree expr, tree stmt_expr) /* It actually has a value we need to deal with. First, force it to be an rvalue so that we won't need to build up a copy constructor call later when we try to assign it to something. */ - expr = force_rvalue (expr); + expr = force_rvalue (expr, tf_warning_or_error); if (error_operand_p (expr)) return error_mark_node; @@ -1892,7 +1892,7 @@ finish_stmt_expr (tree stmt_expr, bool has_no_scope) temporary object created by the final expression is destroyed at the end of the full-expression containing the statement-expression. */ - result = force_target_expr (type, result); + result = force_target_expr (type, result, tf_warning_or_error); } return result; @@ -2407,7 +2407,7 @@ finish_compound_literal (tree type, tree compound_literal, return decl; } else - return get_target_expr (compound_literal); + return get_target_expr_sfinae (compound_literal, complain); } /* Return the declaration for the function-name variable indicated by @@ -7995,7 +7995,7 @@ build_lambda_object (tree lambda_expr) There's normally no way to express direct-initialization from an element of a CONSTRUCTOR, so we build up a special TARGET_EXPR to bypass the usual copy-initialization. */ - val = force_rvalue (val); + val = force_rvalue (val, tf_warning_or_error); if (TREE_CODE (val) == TARGET_EXPR) TARGET_EXPR_DIRECT_INIT_P (val) = true; } |