diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1999-07-26 22:01:44 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1999-07-26 18:01:44 -0400 |
commit | e7f9deaeff2bb58c6dbe62e941828677b387a59e (patch) | |
tree | 811244547bb9a59bada5ce459387421c351c827c /gcc/cpplib.c | |
parent | e428b1a8c6479ad2e1187cb414d370662894f380 (diff) | |
download | gcc-e7f9deaeff2bb58c6dbe62e941828677b387a59e.zip gcc-e7f9deaeff2bb58c6dbe62e941828677b387a59e.tar.gz gcc-e7f9deaeff2bb58c6dbe62e941828677b387a59e.tar.bz2 |
cpplib.c (cpp_get_token): Don't return a CPP_POP if the buffer has manual_pop set.
* cpplib.c (cpp_get_token): Don't return a CPP_POP if the buffer
has manual_pop set.
From-SVN: r28275
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r-- | gcc/cpplib.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c index efd87e1..2718b08 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -2027,12 +2027,13 @@ cpp_get_token (pfile) if (c == EOF) { handle_eof: - if (CPP_BUFFER (pfile)->seen_eof) + if (CPP_BUFFER (pfile)->manual_pop) + /* If we've been reading from redirected input, the + frontend will pop the buffer. */ + return CPP_EOF; + else if (CPP_BUFFER (pfile)->seen_eof) { - if (CPP_PREV_BUFFER (CPP_BUFFER (pfile)) == CPP_NULL_BUFFER (pfile) - /* If we've been reading from redirected input, the - frontend will pop the buffer. */ - || CPP_BUFFER (pfile)->manual_pop) + if (CPP_PREV_BUFFER (CPP_BUFFER (pfile)) == CPP_NULL_BUFFER (pfile)) return CPP_EOF; cpp_pop_buffer (pfile); |