PR c++/35747
* semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
expression is errorneous.
* g++.dg/ext/stmtexpr13.C: New test.
From-SVN: r134567
+2008-04-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/35747
+ * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
+ expression is errorneous.
+
2008-04-21 Jason Merrill <jason@redhat.com>
PR c++/35325
tree result;
if (error_operand_p (stmt_expr))
- return error_mark_node;
+ {
+ pop_stmt_list (stmt_expr);
+ return error_mark_node;
+ }
gcc_assert (TREE_CODE (stmt_expr) == STATEMENT_LIST);
+2008-04-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/35747
+ * g++.dg/ext/stmtexpr13.C: New test.
+
2008-04-22 Ian Lance Taylor <iant@google.com>
* gcc.c-torture/compile/20080419-1.c: New test.
--- /dev/null
+// PR c++/35747
+// { dg-do compile }
+// { dg-options "" }
+
+void
+foo ()
+{
+ ({ i; ({ i; }); 0; }); // { dg-error "was not declared" }
+}