cpplib.c (cpp_get_token): Don't return a CPP_POP if the buffer has manual_pop set.
authorJason Merrill <jason@yorick.cygnus.com>
Mon, 26 Jul 1999 22:01:44 +0000 (22:01 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 26 Jul 1999 22:01:44 +0000 (18:01 -0400)
* cpplib.c (cpp_get_token): Don't return a CPP_POP if the buffer
has manual_pop set.

From-SVN: r28275

gcc/ChangeLog
gcc/cpplib.c

index 846e3df513d2db4506a6ba23207aebdcae97ac8f..8c7a30bd4db9f2272d78410a5037fe74959fae46 100644 (file)
@@ -1,3 +1,8 @@
+Mon Jul 26 12:30:09 1999  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * cpplib.c (cpp_get_token): Don't return a CPP_POP if the buffer
+       has manual_pop set.
+
 1999-07-26  Nathan Sidwell  <nathan@acm.org>
 
        * eh-common.h (__eh_matcher): Prototype correctly.
index efd87e1ccaa22814dad1c0612fafdc12e926c55b..2718b08a6e62b87014979cfd6d83566933bfee8d 100644 (file)
@@ -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);