Commit d7b5fa31 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/35747 (ICE with undefined variable in statement expression)

	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
parent b2f06c39
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
......
......@@ -1739,7 +1739,10 @@ finish_stmt_expr (tree stmt_expr, bool has_no_scope)
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.
// PR c++/35747
// { dg-do compile }
// { dg-options "" }
void
foo ()
{
({ i; ({ i; }); 0; }); // { dg-error "was not declared" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment