re PR preprocessor/14331 (please add option to suppress warning message "no newline...
authorDave Korn <dave.korn@artimi.com>
Thu, 31 May 2007 02:06:48 +0000 (02:06 +0000)
committerDave Korn <davek@gcc.gnu.org>
Thu, 31 May 2007 02:06:48 +0000 (02:06 +0000)
2007-05-31  Dave Korn  <dave.korn@artimi.com>

        PR preprocessor/14331
        * lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.

From-SVN: r125212

libcpp/ChangeLog
libcpp/lex.c

index a95ae545b07f69620189ffc602a967d8e23d28bd..ef6c39762a873671a74f37ba00e7b0deea6f28be 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-31  Dave Korn  <dave.korn@artimi.com>
+
+       PR preprocessor/14331
+       * lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.
+
 2007-05-24  Ollie Wild  <aaw@google.com>
 
        * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
index 296b39998115953edddd760c26c164c1c0cd15f7..ef59f900c64ae8f6b24109e1b68b25071d29c1cd 100644 (file)
@@ -852,11 +852,8 @@ _cpp_get_fresh_line (cpp_reader *pfile)
          && buffer->next_line > buffer->rlimit
          && !buffer->from_stage3)
        {
-         /* Only warn once.  */
+         /* Clip to buffer size.  */
          buffer->next_line = buffer->rlimit;
-         cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line,
-                              CPP_BUF_COLUMN (buffer, buffer->cur),
-                              "no newline at end of file");
        }
 
       return_at_eof = buffer->return_at_eof;