diff options
author | Jason Merrill <jason@redhat.com> | 2002-06-18 12:21:25 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2002-06-18 12:21:25 -0400 |
commit | 18ba380b3a22e6e76d6515c16931611a0bcbf7e6 (patch) | |
tree | f9f4f9809150114e0560826c7677811b1e92d479 | |
parent | e3c8eb86d193160035cb64e7284e2183cd973792 (diff) | |
download | gcc-18ba380b3a22e6e76d6515c16931611a0bcbf7e6.zip gcc-18ba380b3a22e6e76d6515c16931611a0bcbf7e6.tar.gz gcc-18ba380b3a22e6e76d6515c16931611a0bcbf7e6.tar.bz2 |
semantics.c (begin_for_stmt): Push the 'for' scope before adding the FOR_STMT.
* semantics.c (begin_for_stmt): Push the 'for' scope before
adding the FOR_STMT.
From-SVN: r54749
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 21ced62..2572a56 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2002-06-14 Jason Merrill <jason@redhat.com> + * semantics.c (begin_for_stmt): Push the 'for' scope before + adding the FOR_STMT. + C++ ABI changes. * class.c (build_base_field): Set DECL_PACKED. (layout_class_type): Don't use tail padding of PODs. diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index bbc2203..c6c3047 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -417,12 +417,12 @@ begin_for_stmt () r = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE); NEW_FOR_SCOPE_P (r) = flag_new_for_scope > 0; - add_stmt (r); if (NEW_FOR_SCOPE_P (r)) { do_pushlevel (); note_level_for_for (); } + add_stmt (r); return r; } |