2013-12-13 Jan-Benedict Glaw <jbglaw@lug-owl.de>
[deliverable/binutils-gdb.git] / gas / app.c
index ec3a35ee865ffdb521ab784e70e38f38d0c6cf6c..1a7ce95289bb75def8cfac775b70d7bf53a6b53d 100644 (file)
--- a/gas/app.c
+++ b/gas/app.c
@@ -1217,9 +1217,16 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
                  while (ch != EOF && !IS_NEWLINE (ch))
                    ch = GET ();
                  if (ch == EOF)
-                   as_warn (_("end of file in comment; newline inserted"));
+                   {
+                     as_warn (_("end of file in comment; newline inserted"));
+                     PUT ('\n');
+                   }
+                 else /* IS_NEWLINE (ch) */
+                   {
+                     /* To process non-zero add_newlines.  */
+                     UNGET (ch);
+                   }
                  state = 0;
-                 PUT ('\n');
                  break;
                }
              /* Looks like `# 123 "filename"' from cpp.  */
This page took 0.023003 seconds and 4 git commands to generate.