From 8ed2e447820bcd86719b1af863d9e46b82a193d0 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sat, 15 Nov 2014 18:28:58 -0500 Subject: [PATCH] parser.c (cp_parser_omp_declare_reduction_exprs): A block is not an expression. * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not an expression. From-SVN: r217618 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/parser.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8508db1047e..0c5e72b2027 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2014-11-15 Jason Merrill + * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not + an expression. + * constexpr.c (cxx_eval_builtin_function_call): Use fold_builtin_call_array. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 3ab65a91556..111ec1090b8 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -31188,7 +31188,7 @@ cp_parser_omp_declare_reduction_exprs (tree fndecl, cp_parser *parser) block = finish_omp_structured_block (block); cp_walk_tree (&block, cp_remove_omp_priv_cleanup_stmt, omp_priv, NULL); - finish_expr_stmt (block); + add_stmt (block); if (ctor) add_decl_expr (omp_orig); -- 2.30.2