aboutsummaryrefslogtreecommitdiff
path: root/gas/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/app.c')
-rw-r--r--gas/app.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gas/app.c b/gas/app.c
index ec3a35e..1a7ce95 100644
--- 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. */