diff options
author | Alexey Makhalov <makhaloff@gmail.com> | 2013-11-19 08:19:21 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2013-11-19 08:19:21 +0000 |
commit | cf3f45fad7811e89d6b586a1a429a314e3db9f53 (patch) | |
tree | b497b4a4e58284778cbb97b8a73efe471fa71d98 /gas/app.c | |
parent | 077e2c8848810b23531b7fdae1739a5eab83c04f (diff) | |
download | gdb-cf3f45fad7811e89d6b586a1a429a314e3db9f53.zip gdb-cf3f45fad7811e89d6b586a1a429a314e3db9f53.tar.gz gdb-cf3f45fad7811e89d6b586a1a429a314e3db9f53.tar.bz2 |
PR gas/16109
* app.c (do_scrub_chars): Only insert a newline character if
end-of-file has been reached.
Diffstat (limited to 'gas/app.c')
-rw-r--r-- | gas/app.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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. */ |