summaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-04 12:01:59 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-04 12:01:59 +0000
commit4dfe8b745ff717c66fab3bc5d759a1d862ddd074 (patch)
tree0aaaf48e2153d5621bc68cb09f9c0d2ef9a3854a /gcc/cppinit.c
parent3cbe3ca9fef6daf335579b8cee2b0fe6fbfe9877 (diff)
downloadgcc-4dfe8b745ff717c66fab3bc5d759a1d862ddd074.tar.gz
* Makefile.in (CPPLIB_H): New, so that dependencies on cpplib.h
are also on line-map.h. * cppfiles.c (stack_include_file): Update. * cpphash.h (struct cpp_buffer): New member return_at_eof. (_cpp_pop_buffer): New. * cppinit.c (cpp_destroy, cpp_finish): Update. (do_includes): Mark each buffer to return at EOF. * cpplex.c (_cpp_lex_token): Pop buffers at EOF. Continue or return as requested. * cpplib.c (run_directive, do_line, cpp_push_buffer): Update. (cpp_pop_buffer): Rename _cpp_pop_buffer. Stop skipping. * cpplib.h (cpp_pop_buffer): Remove. (cpp_scan_buffer_nooutput): Rename cpp_scan_nooutput. * cppmacro.c (cpp_scan_buffer_nooutput): Similarly. No need to pop buffers. * cppmain.c (scan_buffer): Rename scan_translation_unit. No need to pop buffers. (do_preprocessing): Update. * fix-header.c (read_scan_file): Update. No need to pop buffers. * c-parse.in (_yylex): Similarly. * scan-decls.c (scan_decls): Similarly. * line-map.h: Update comments. * cp/spew.c (read_token): No need to pop buffers. * objc/Make-lang.in (objc-act.o): Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44634 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index fa01b347055..6d4c7a0aa34 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -555,7 +555,7 @@ cpp_destroy (pfile)
cpp_context *context, *contextn;
while (CPP_BUFFER (pfile) != NULL)
- cpp_pop_buffer (pfile);
+ _cpp_pop_buffer (pfile);
if (pfile->macro_buffer)
{
@@ -883,7 +883,10 @@ do_includes (pfile, p, scan)
header.val.str.text = (const unsigned char *) p->arg;
header.val.str.len = strlen (p->arg);
if (_cpp_execute_include (pfile, &header, IT_CMDLINE) && scan)
- cpp_scan_buffer_nooutput (pfile, 0);
+ {
+ pfile->buffer->return_at_eof = true;
+ cpp_scan_nooutput (pfile);
+ }
}
q = p->next;
free (p);
@@ -1011,7 +1014,7 @@ cpp_finish (pfile)
{
cpp_ice (pfile, "buffers still stacked in cpp_finish");
while (CPP_BUFFER (pfile))
- cpp_pop_buffer (pfile);
+ _cpp_pop_buffer (pfile);
}
/* Don't write the deps file if preprocessing has failed. */