diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6213941e817..0ef43a3ff0b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-05-11 Neil Booth + + * cpplex.c (_cpp_lex_direct): When in a directive at EOF + fake a newline. + 2002-05-11 Zack Weinberg * config/rs6000/rs6000.c (rs6000_default_long_calls, diff --git a/gcc/cpplex.c b/gcc/cpplex.c index bba6f074730..f2d07963f79 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -930,7 +930,7 @@ _cpp_lex_direct (pfile) /* EOF. */ buffer->cur--; buffer->saved_flags = BOL; - if (!pfile->state.parsing_args && !pfile->state.in_directive) + if (!pfile->state.parsing_args) { if (buffer->cur != buffer->line_base) { @@ -942,7 +942,7 @@ _cpp_lex_direct (pfile) } /* Don't pop the last buffer. */ - if (buffer->prev) + if (!pfile->state.in_directive && buffer->prev) { unsigned char stop = buffer->return_at_eof;