Commit c3783399 by Nathan Sidwell Committed by Nathan Sidwell

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
parent 5e1a2fc7
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> 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
* decl.c: Remove all signal handling code, now done in toplev.c. * decl.c: Remove all signal handling code, now done in toplev.c.
......
...@@ -1441,7 +1441,8 @@ poplevel (keep, reverse, functionbody) ...@@ -1441,7 +1441,8 @@ poplevel (keep, reverse, functionbody)
/* Remove declarations for all the DECLs in this level. */ /* Remove declarations for all the DECLs in this level. */
for (link = decls; link; link = TREE_CHAIN (link)) 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 outer_binding
= TREE_CHAIN (IDENTIFIER_BINDING (DECL_NAME (link))); = TREE_CHAIN (IDENTIFIER_BINDING (DECL_NAME (link)));
...@@ -7843,6 +7844,9 @@ void ...@@ -7843,6 +7844,9 @@ void
maybe_inject_for_scope_var (decl) maybe_inject_for_scope_var (decl)
tree decl; tree decl;
{ {
if (!DECL_NAME (decl))
return;
if (current_binding_level->is_for_scope) if (current_binding_level->is_for_scope)
{ {
struct binding_level *outer struct binding_level *outer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment