aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2003-08-07 03:12:09 +0000
committerZack Weinberg <zack@gcc.gnu.org>2003-08-07 03:12:09 +0000
commitfdc49e10e69a5f250b6784c77c3617fb853e5634 (patch)
treecbd19b1bfbd1bc0e96fba027d2c31276bb28dfa6 /gcc/c-decl.c
parent7c6e92558c74d538f6790a81178b8cbe21f9dedc (diff)
downloadgcc-fdc49e10e69a5f250b6784c77c3617fb853e5634.zip
gcc-fdc49e10e69a5f250b6784c77c3617fb853e5634.tar.gz
gcc-fdc49e10e69a5f250b6784c77c3617fb853e5634.tar.bz2
c-decl.c (builtin_decls): Replace with first_builtin_decl and last_builtin_decl.
* c-decl.c (builtin_decls): Replace with first_builtin_decl and last_builtin_decl. (c_init_decl_processing): Initialize both. (c_reset_state): Iterate from first_builtin_decl to last_builtin_decl inclusive to reintroduce builtins. From-SVN: r70218
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 9c6af80..b31686b 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -130,9 +130,10 @@ static GTY(()) tree c_scope_stmt_stack;
some other global meaning for that identifier. */
static GTY(()) tree truly_local_externals;
-/* A list of the builtin file-scope DECLs. */
+/* All the builtins; this is a subset of the entries of global_scope. */
-static GTY(()) tree builtin_decls;
+static GTY(()) tree first_builtin_decl;
+static GTY(()) tree last_builtin_decl;
/* A DECL for the current file-scope context. */
@@ -2288,7 +2289,8 @@ c_init_decl_processing (void)
make_fname_decl = c_make_fname_decl;
start_fname_decls ();
- builtin_decls = global_scope->names;
+ first_builtin_decl = global_scope->names;
+ last_builtin_decl = global_scope->names_last;
}
/* Create the VAR_DECL for __FUNCTION__ etc. ID is the name to give the
@@ -6869,8 +6871,10 @@ c_reset_state (void)
current_file_decl = build_decl (TRANSLATION_UNIT_DECL, NULL, NULL);
TREE_CHAIN (current_file_decl) = file_scope_decl;
- /* Reintroduce the global declarations. */
- for (link = builtin_decls; link; link = TREE_CHAIN (link))
+ /* Reintroduce the builtin declarations. */
+ for (link = first_builtin_decl;
+ link != TREE_CHAIN (last_builtin_decl);
+ link = TREE_CHAIN (link))
pushdecl (copy_node (link));
}