cpplib manual_pop tweak
Jason Merrill
jason@cygnus.com
Mon Jul 26 15:01:00 GMT 1999
The CPP_POP token is confusing the C++ frontend, and it's not useful
anyway. Applied.
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.
Index: cpplib.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cpplib.c,v
retrieving revision 1.83
diff -c -p -r1.83 cpplib.c
*** cpplib.c 1999/07/20 19:13:00 1.83
--- cpplib.c 1999/07/26 21:59:35
*************** cpp_get_token (pfile)
*** 2027,2038 ****
if (c == EOF)
{
handle_eof:
! 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)
return CPP_EOF;
cpp_pop_buffer (pfile);
--- 2027,2039 ----
if (c == EOF)
{
handle_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))
return CPP_EOF;
cpp_pop_buffer (pfile);
More information about the Gcc-patches
mailing list