diff options
author | Neil Booth <neil@gcc.gnu.org> | 2000-12-07 07:14:42 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-12-07 07:14:42 +0000 |
commit | 9ba2e1ef8028112b47eb48041ae387c60acea6b1 (patch) | |
tree | 183c8a37ae0d1cb8f8f4a7c5d3cc009146d70982 /gcc/fix-header.c | |
parent | 167ed88f7ab3220aab5b66fef1ac3c12a8d326b9 (diff) | |
download | gcc-9ba2e1ef8028112b47eb48041ae387c60acea6b1.zip gcc-9ba2e1ef8028112b47eb48041ae387c60acea6b1.tar.gz gcc-9ba2e1ef8028112b47eb48041ae387c60acea6b1.tar.bz2 |
c-common.c (parse_in): Make a cpp_reader *.
* 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.
From-SVN: r38101
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 8727512..281e4c4 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); |