diff options
author | schwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-03 09:41:00 +0000 |
---|---|---|
committer | schwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-03 09:41:00 +0000 |
commit | 54915428a0dd3f2d48f8e78eb6a2595567a5b6f4 (patch) | |
tree | cbc23e02d49a928631fef7e5b64be1beb9789c5c /gcc/cppfiles.c | |
parent | ed1e5d409737c9503e0e2cb9c51ea2f4a69c8ad0 (diff) | |
download | ppe42-gcc-54915428a0dd3f2d48f8e78eb6a2595567a5b6f4.tar.gz ppe42-gcc-54915428a0dd3f2d48f8e78eb6a2595567a5b6f4.zip |
* cppfiles.c (_cpp_pop_file_buffer): Change return type to bool
and return true if _cpp_push_next_buffer pushed a new include
file.
* cpplib.c (_cpp_pop_buffer): Only call obstack_free if
_cpp_pop_file_buffer did not push a new file.
* cpphash.h (_cpp_pop_file_buffer): Update declaration.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48507 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 3bdc8f3fbfc..11fc3256703 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -748,11 +748,13 @@ _cpp_read_file (pfile, fname) /* Do appropriate cleanup when a file buffer is popped off the input stack. Push the next -include file, if any remain. */ -void +bool _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) @@ -772,8 +774,10 @@ _cpp_pop_file_buffer (pfile, inc) /* Finally, push the next -included file, if any. */ if (!pfile->buffer->prev) - _cpp_push_next_buffer (pfile); + pushed = _cpp_push_next_buffer (pfile); } + + return pushed; } /* Returns the first place in the include chain to start searching for |