re PR c++/16034 (dtor called prematurely for while-loop scoped variable)
authorRichard Henderson <rth@redhat.com>
Fri, 18 Jun 2004 22:51:57 +0000 (15:51 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 18 Jun 2004 22:51:57 +0000 (15:51 -0700)
commitcaf2523d6d984c1c46b1c5056b835448f4fc02a9
tree2762b11388dd64d6b16fe86a4039c2bb93c95ba6
parent7465ed07083691bf03e737e8709afa0e20c5f82f
re PR c++/16034 (dtor called prematurely for while-loop scoped variable)

        PR c++/16034
        * c-gimplify.c (gimplify_condition): Remove.
        (gimplify_c_loop, gimplify_if_stmt, gimplify_switch_stmt): Don't
        call it.
cp/
        * semantics.c (begin_cond): New.
        (finish_cond): Rewrite to handle template DECL_STMTs specially.
        Assume that non-template decls go land before the conditional.
        (simplify_loop_decl_cond): Likewise.
        (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
        finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
        begin_switch_stmt, finish_switch_cond): Update to match.

From-SVN: r83368
gcc/ChangeLog
gcc/c-gimplify.c
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/g++.dg/eh/scope1.C [new file with mode: 0644]