diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ca69ac91ab0e..69f116c3d936 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,7 +1,11 @@ +2003-04-22 Neil Booth + + * cpplex.c (_cpp_get_fresh_line): Pop the buffer if return_at_eof. 2003-04-22 Devang Patel - * cpptrad.c (_cpp_replacement_text_len): Add check for macro parameter count. + * cpptrad.c (_cpp_replacement_text_len): Add check for macro + parameter count. (_cpp_copy_replacement_text): Same. 2003-04-22 Neil Booth diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 552a40657e04..d6c617d35422 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -714,15 +714,15 @@ _cpp_get_fresh_line (pfile) "no newline at end of file"); } - if (buffer->return_at_eof) - { - buffer->return_at_eof = false; - return false; - } - if (!buffer->prev) return false; + if (buffer->return_at_eof) + { + _cpp_pop_buffer (pfile); + return false; + } + _cpp_pop_buffer (pfile); } }