diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1996-04-16 17:32:49 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1996-04-16 17:32:49 -0400 |
commit | 0500d6f9b27f4f499b7aa2256ebc35c1e3be57a2 (patch) | |
tree | 02234c302e45f52f4777735f7717eef9166f8926 /gcc/c-decl.c | |
parent | f12d26af47d21dff9112b8c241080b6331534c80 (diff) | |
download | gcc-0500d6f9b27f4f499b7aa2256ebc35c1e3be57a2.tar.gz |
(clear_limbo_values): New function.
(pushdecl): Call it for function body blocks.
From-SVN: r11828
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 249992b23ba..38c25eba6af 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -902,6 +902,22 @@ pushlevel (tag_transparent) keep_next_if_subblocks = 0; } +/* Clear the limbo values of all identifiers defined in BLOCK or a subblock. */ + +static void +clear_limbo_values (block) + tree block; +{ + tree tem; + + for (tem = BLOCK_VARS (block); tem; tem = TREE_CHAIN (tem)) + if (DECL_NAME (tem) != 0) + IDENTIFIER_LIMBO_VALUE (DECL_NAME (tem)) = 0; + + for (tem = BLOCK_SUBBLOCKS (block); tem; tem = TREE_CHAIN (tem)) + clear_limbo_values (tem); +} + /* Exit a binding level. Pop the level off, and restore the state of the identifier-decl mappings that were in effect when this level was entered. @@ -1055,6 +1071,8 @@ poplevel (keep, reverse, functionbody) if (functionbody) { + clear_limbo_values (block); + /* If this is the top level block of a function, the vars are the function's parameters. Don't leave them in the BLOCK because they are |