From e7f9deaeff2bb58c6dbe62e941828677b387a59e Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 26 Jul 1999 22:01:44 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/cpplib.c | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 846e3df513d..8c7a30bd4db 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Jul 26 12:30:09 1999 Jason Merrill + + * cpplib.c (cpp_get_token): Don't return a CPP_POP if the buffer + has manual_pop set. + 1999-07-26 Nathan Sidwell * eh-common.h (__eh_matcher): Prototype correctly. diff --git a/gcc/cpplib.c b/gcc/cpplib.c index efd87e1ccaa..2718b08a6e6 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); -- 2.30.2