aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppfiles.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-04-22 17:48:02 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-04-22 17:48:02 +0000
commitaf0d16cdec59d270a017f82ac209c44dfa748ea3 (patch)
tree0fc130b06a7d9e6cdc2502aaa5f671bb726c8773 /gcc/cppfiles.c
parent74b273d68f6a479fa9a563ff87ef3e9561408c2c (diff)
downloadgcc-af0d16cdec59d270a017f82ac209c44dfa748ea3.zip
gcc-af0d16cdec59d270a017f82ac209c44dfa748ea3.tar.gz
gcc-af0d16cdec59d270a017f82ac209c44dfa748ea3.tar.bz2
cppfiles.c (_cpp_pop_file_buffer): Return void.
* cppfiles.c (_cpp_pop_file_buffer): Return void. Move file change and include code to _cpp_pop_buffer. * cpphash.h (struct pending_option): Predeclare. (struct cpp_reader): New member next_include_file. (_cpp_pop_file_buffer): Update. (_cpp_push_next_buffer): Update, rename. * cppinit.c (cpp_destroy): Free include chain and pending here. (cpp_finish_options): Simplify. (_cpp_push_next_buffer): Rename and clean up. * cpplib.c (cpp_pop_buffer): Move code from _cpp_pop_file_buffer. Clarify. * cppmacro.c (cpp_scan_nooutput): Set return_at_eof here. From-SVN: r52621
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r--gcc/cppfiles.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c
index 38780ad..7600523 100644
--- a/gcc/cppfiles.c
+++ b/gcc/cppfiles.c
@@ -761,14 +761,12 @@ _cpp_read_file (pfile, fname)
}
/* Do appropriate cleanup when a file INC's buffer is popped off the
- input stack. Push the next -include file, if any remain. */
-bool
+ input stack. */
+void
_cpp_pop_file_buffer (pfile, inc)
cpp_reader *pfile;
struct include_file *inc;
{
- bool pushed = false;
-
/* Record the inclusion-preventing macro, which could be NULL
meaning no controlling macro. */
if (pfile->mi_valid && inc->cmacro == NULL)
@@ -780,18 +778,6 @@ _cpp_pop_file_buffer (pfile, inc)
inc->refcnt--;
if (inc->refcnt == 0 && DO_NOT_REREAD (inc))
purge_cache (inc);
-
- /* Don't generate a callback for popping the main file. */
- if (pfile->buffer)
- {
- _cpp_do_file_change (pfile, LC_LEAVE, 0, 0, 0);
-
- /* Finally, push the next -included file, if any. */
- if (!pfile->buffer->prev)
- pushed = _cpp_push_next_buffer (pfile);
- }
-
- return pushed;
}
/* Returns the first place in the include chain to start searching for