parser.c (cp_parser_omp_declare_reduction_exprs): A block is not an expression.
authorJason Merrill <jason@redhat.com>
Sat, 15 Nov 2014 23:28:58 +0000 (18:28 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Sat, 15 Nov 2014 23:28:58 +0000 (18:28 -0500)
* parser.c (cp_parser_omp_declare_reduction_exprs): A block is not
an expression.

From-SVN: r217618

gcc/cp/ChangeLog
gcc/cp/parser.c

index 8508db1047ea47eceac90dc4d0550ae9fa22ddb5..0c5e72b2027b0067537d3e37395b86d2f809d1a1 100644 (file)
@@ -1,5 +1,8 @@
 2014-11-15  Jason Merrill  <jason@redhat.com>
 
+       * 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.
 
index 3ab65a915565ad90a64e9a681c5d1db1e4c8ce90..111ec1090b8b785625af084b07d999fda30d762c 100644 (file)
@@ -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);