From 387f9e323b1b61d355b3ee6a0d843e26d21bf2de Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sat, 11 May 2002 21:02:34 +0000 Subject: [PATCH] cpplex.c (_cpp_lex_direct): When in a directive at EOF fake a newline. * cpplex.c (_cpp_lex_direct): When in a directive at EOF fake a newline. From-SVN: r53386 --- gcc/ChangeLog | 5 +++++ gcc/cpplex.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6213941..0ef43a3 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 bba6f07..f2d0796 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; -- 2.7.4