/cp
2018-09-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84940
* semantics.c (finish_unary_op_expr): Check return value of
build_x_unary_op for error_mark_node.
/testsuite
2018-09-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84940
* g++.dg/expr/unary4.C: New.
From-SVN: r264664
+2018-09-27 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/84940
+ * semantics.c (finish_unary_op_expr): Check return value of
+ build_x_unary_op for error_mark_node.
+
2018-09-25 Jakub Jelinek <jakub@redhat.com>
PR c++/87398
/* TODO: build_x_unary_op doesn't always honor the location. */
result.set_location (combined_loc);
- tree result_ovl, expr_ovl;
+ if (result == error_mark_node)
+ return result;
if (!(complain & tf_warning))
return result;
- result_ovl = result;
- expr_ovl = expr;
+ tree result_ovl = result;
+ tree expr_ovl = expr;
if (!processing_template_decl)
expr_ovl = cp_fully_fold (expr_ovl);
+2018-09-27 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/84940
+ * g++.dg/expr/unary4.C: New.
+
2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
PR gcov-profile/86957
--- /dev/null
+// PR c++/84940
+// { dg-additional-options -Wno-vla }
+
+void
+foo (int x)
+{
+ struct {} a[1][x](-a[0]); // { dg-error "wrong type argument to unary minus" }
+}