cpplex.c (_cpp_lex_direct): When in a directive at EOF fake a newline.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Sat, 11 May 2002 21:02:34 +0000 (21:02 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sat, 11 May 2002 21:02:34 +0000 (21:02 +0000)
* cpplex.c (_cpp_lex_direct): When in a directive at EOF
fake a newline.

From-SVN: r53386

gcc/ChangeLog
gcc/cpplex.c

index 6213941..0ef43a3 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * cpplex.c (_cpp_lex_direct): When in a directive at EOF
+       fake a newline.
+
 2002-05-11  Zack Weinberg  <zack@codesourcery.com>
 
        * config/rs6000/rs6000.c (rs6000_default_long_calls,
index bba6f07..f2d0796 100644 (file)
@@ -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;