aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpphash.h
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2004-02-18 14:02:39 -0800
committerPer Bothner <bothner@gcc.gnu.org>2004-02-18 14:02:39 -0800
commit22234f56d2395ae470961d3eb5fdc65a7597af9a (patch)
treee807c23671fa4dd53228ec168fcfa7e99628f896 /gcc/cpphash.h
parent5a6d9a81c7415f0efb61a18f5bd4890286a1c003 (diff)
downloadgcc-22234f56d2395ae470961d3eb5fdc65a7597af9a.zip
gcc-22234f56d2395ae470961d3eb5fdc65a7597af9a.tar.gz
gcc-22234f56d2395ae470961d3eb5fdc65a7597af9a.tar.bz2
re PR preprocessor/14103 (ICEs on "gcc -E -imacros foo.h baz.c")
* cpphash.h (struct cpp_buffer): Restore return_at_eof field. This partly reverts my 2003-10-01 change, because we're back to logically including <command line> inside the main line. * cpplex.c (_cpp_get_fresh_line): Check return_at_eof field. * cppmacro.c (cpp_scan_nooutput): Set return_at_eof of current buffer. Fixes PR preprocessor/14103. * cppfiles.c (_cpp_stack_include): When appropriate decrement line_table's highest_location, fixing LAST_SOURCE_LINE_LOCATION. (cpp_push_include): Don't need to increment pfile's line field. * line-map.h (LAST_SOURCE_LINE_LOCATION): Only decrement by 1. * c-ppoutput.c (print struct): New first_time field. (init_pp_output): Set print.first_time. (pp_file_change): Use print.first_time, rather than MAIN_FILE_P, which is set also for (say) <command line>. Clear print.first_time. * cppfiles.c (struct _cpp_file): Comment and type for pch field does not match the code, so fix both. (should_stack_file): Inline include_pch_p function. (include_pch_p): Remove pointless function. * cpphash.h (struct cpp_buffer): Remove unused search_cached field. From-SVN: r78049
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r--gcc/cpphash.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h
index 693d2ba..4e86bf3 100644
--- a/gcc/cpphash.h
+++ b/gcc/cpphash.h
@@ -310,9 +310,10 @@ struct cpp_buffer
buffers. */
unsigned int from_stage3 : 1;
- /* Nonzero means that the directory to start searching for ""
- 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. */
+ unsigned int return_at_eof : 1;
/* One for a system header, two for a C system header file that therefore
needs to be extern "C" protected in C++, and zero otherwise. */