diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-15 15:23:53 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-15 15:23:53 +0000 |
commit | ec95f7ad4b38e2a4f032583f8a9b6c7043d5ba5e (patch) | |
tree | 78d0c26d1b0965f62f5c7fec597905aa22efcd16 /gcc/cp | |
parent | 9de38bc3ccb5faf22bf525f0f3dfa78e63de71e4 (diff) | |
download | ppe42-gcc-ec95f7ad4b38e2a4f032583f8a9b6c7043d5ba5e.tar.gz ppe42-gcc-ec95f7ad4b38e2a4f032583f8a9b6c7043d5ba5e.zip |
PR c++/56388
* semantics.c (insert_capture_proxy): Just use index 1 in the
stmt_list_stack.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197981 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 623760776b5..eefd11ea890 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2013-04-15 Jason Merrill <jason@redhat.com> + + PR c++/56388 + * semantics.c (insert_capture_proxy): Just use index 1 in the + stmt_list_stack. + 2013-04-12 Jakub Jelinek <jakub@redhat.com> * error.c (cp_print_error_function, diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index a09a7f480ed..2784d797bdb 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -9265,13 +9265,12 @@ void insert_capture_proxy (tree var) { cp_binding_level *b; - int skip; tree stmt_list; /* Put the capture proxy in the extra body block so that it won't clash with a later local variable. */ b = current_binding_level; - for (skip = 0; ; ++skip) + for (;;) { cp_binding_level *n = b->level_chain; if (n->kind == sk_function_parms) @@ -9282,7 +9281,7 @@ insert_capture_proxy (tree var) /* And put a DECL_EXPR in the STATEMENT_LIST for the same block. */ var = build_stmt (DECL_SOURCE_LOCATION (var), DECL_EXPR, var); - stmt_list = (*stmt_list_stack)[stmt_list_stack->length () - 1 - skip]; + stmt_list = (*stmt_list_stack)[1]; gcc_assert (stmt_list); append_to_statement_list_force (var, &stmt_list); } |