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
This commit is contained in:
parent
b2f06c39b0
commit
d7b5fa3150
|
@ -1,3 +1,9 @@
|
|||
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);
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
// PR c++/35747
|
||||
// { dg-do compile }
|
||||
// { dg-options "" }
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
({ i; ({ i; }); 0; }); // { dg-error "was not declared" }
|
||||
}
|
Loading…
Reference in New Issue