From 4dfe8b745ff717c66fab3bc5d759a1d862ddd074 Mon Sep 17 00:00:00 2001 From: neil Date: Sat, 4 Aug 2001 12:01:59 +0000 Subject: * 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 --- gcc/cpphash.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/cpphash.h') diff --git a/gcc/cpphash.h b/gcc/cpphash.h index 0c1695c1d09..b1d03251aa5 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -226,6 +226,11 @@ struct cpp_buffer include files has been calculated and stored in "dir" below. */ unsigned char search_cached; + /* At EOF, a buffer is automatically popped. If RETURN_AT_EOF is + true, a CPP_EOF token is then returned. Otherwise, the next + token from the enclosing buffer is returned. */ + bool return_at_eof; + /* Buffer type. */ ENUM_BITFIELD (cpp_buffer_type) type : 8; @@ -441,6 +446,7 @@ extern void _cpp_do__Pragma PARAMS ((cpp_reader *)); extern void _cpp_init_directives PARAMS ((cpp_reader *)); extern void _cpp_init_internal_pragmas PARAMS ((cpp_reader *)); extern void _cpp_do_file_change PARAMS ((cpp_reader *, enum lc_reason)); +extern void _cpp_pop_buffer PARAMS ((cpp_reader *)); /* Utility routines and macros. */ #define DSC(str) (const U_CHAR *)str, sizeof str - 1 -- cgit v1.2.1