diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2021-03-03 16:13:00 +0000 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2021-09-01 14:23:16 +0100 |
commit | 8406ed9af2655479a9c8469d7acca2cf5784f5d6 (patch) | |
tree | 1ed34c5e6357e12888a85536c3622b2011c511d5 /gcc | |
parent | fcc0c84cf5d29de431172347a28366ee0b428a86 (diff) | |
download | gcc-8406ed9af2655479a9c8469d7acca2cf5784f5d6.zip gcc-8406ed9af2655479a9c8469d7acca2cf5784f5d6.tar.gz gcc-8406ed9af2655479a9c8469d7acca2cf5784f5d6.tar.bz2 |
coroutines: No cleanups on goto statements.
Minor cleanup, this is statement not an expression, we do not
need to use finish_expr_stmt here.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/ChangeLog:
* coroutines.cc (await_statement_walker): Use build_stmt and
add_stmt instead of build1 and finish_expr_stmt.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/coroutines.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index 25269d9..3bb33cc 100644 --- a/gcc/cp/coroutines.cc +++ b/gcc/cp/coroutines.cc @@ -3824,8 +3824,8 @@ await_statement_walker (tree *stmt, int *do_subtree, void *d) the parameter to return_value(). */ if (!maybe_await_stmt) maybe_await_stmt = tsi_stmt_ptr (tsi_last (ret_list)); - expr = build1_loc (loc, GOTO_EXPR, void_type_node, awpts->fs_label); - finish_expr_stmt (expr); + TREE_USED (awpts->fs_label) = 1; + add_stmt (build_stmt (loc, GOTO_EXPR, awpts->fs_label)); *stmt = pop_stmt_list (ret_list); /* Once this is complete, we will have processed subtrees. */ *do_subtree = 0; |