diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-07 07:14:42 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-07 07:14:42 +0000 |
commit | 41a9aa85e255a4f2cf8d2dcab82a1a7a82429e0b (patch) | |
tree | 183c8a37ae0d1cb8f8f4a7c5d3cc009146d70982 /gcc/fix-header.c | |
parent | 7943f969d8272002108ef9f24acbd69c7e485eee (diff) | |
download | gcc-41a9aa85e255a4f2cf8d2dcab82a1a7a82429e0b.tar.gz |
* c-common.c (parse_in): Make a cpp_reader *.
* cppfiles.c (_cpp_fake_include): Remove.
* cpphash.h: Similarly.
* cpplib.c (do_line): Don't call _cpp_fake_include. A valid
#line always creates a callback; FC_RENAME if there are no
#line flags.
* fix-header.c (read_scan_file): cpp_push_buffer cannot fail.
The first EOF must be our get_char buffer.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38101 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fix-header.c')
-rw-r--r-- | gcc/fix-header.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/fix-header.c b/gcc/fix-header.c index 872751257ab..281e4c411c9 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -649,26 +649,21 @@ read_scan_file (in_fname, argc, argv) { static const unsigned char getchar_call[] = "getchar();"; int seen_filbuf = 0; - cpp_buffer *buf = CPP_BUFFER (scan_in); - if (cpp_push_buffer (scan_in, getchar_call, - sizeof(getchar_call) - 1) == NULL) - return; /* Scan the macro expansion of "getchar();". */ + cpp_push_buffer (scan_in, getchar_call, sizeof(getchar_call) - 1); for (;;) { cpp_token t; cpp_get_token (scan_in, &t); if (t.type == CPP_EOF) - { - cpp_pop_buffer (scan_in); - if (CPP_BUFFER (scan_in) == buf) - break; - } + break; else if (cpp_ideq (&t, "_filbuf")) seen_filbuf++; } + cpp_pop_buffer (scan_in); + if (seen_filbuf) { int need_filbuf = !SEEN (fn) && !REQUIRED (fn); |