diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2000-07-25 19:36:26 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2000-07-25 19:36:26 +0000 |
commit | c37833995fe3eeb6c163ad80221c4ff2e7172422 (patch) | |
tree | 378e55f407207f04e26ec3fae76b261ac0264b69 | |
parent | 5e1a2fc70a27a62081cfd9a14aef12c806866cee (diff) | |
download | gcc-c37833995fe3eeb6c163ad80221c4ff2e7172422.zip gcc-c37833995fe3eeb6c163ad80221c4ff2e7172422.tar.gz gcc-c37833995fe3eeb6c163ad80221c4ff2e7172422.tar.bz2 |
decl.c (poplevel): Deal with anonymous variables at for scope.
* decl.c (poplevel): Deal with anonymous variables at for scope.
(maybe_inject_for_scope_var): Likewise.
From-SVN: r35250
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a221131..a55e7d8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2000-07-25 Nathan Sidwell <nathan@codesourcery.com> + + * decl.c (poplevel): Deal with anonymous variables at for scope. + (maybe_inject_for_scope_var): Likewise. + 2000-07-25 Zack Weinberg <zack@wolery.cumb.org> * decl.c: Remove all signal handling code, now done in toplev.c. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index bd64e2e..6c77b9f 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -1441,7 +1441,8 @@ poplevel (keep, reverse, functionbody) /* Remove declarations for all the DECLs in this level. */ for (link = decls; link; link = TREE_CHAIN (link)) { - if (leaving_for_scope && TREE_CODE (link) == VAR_DECL) + if (leaving_for_scope && TREE_CODE (link) == VAR_DECL + && DECL_NAME (link)) { tree outer_binding = TREE_CHAIN (IDENTIFIER_BINDING (DECL_NAME (link))); @@ -7843,6 +7844,9 @@ void maybe_inject_for_scope_var (decl) tree decl; { + if (!DECL_NAME (decl)) + return; + if (current_binding_level->is_for_scope) { struct binding_level *outer |