[binutils-gdb] gas: scrubber handling of string continuation across lines

Jan Beulich jbeulich@sourceware.org
Fri Jul 17 07:25:55 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=59d681f3a8278d29a74dfd7de8ef276d08b717cf

commit 59d681f3a8278d29a74dfd7de8ef276d08b717cf
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Jul 17 09:23:55 2026 +0200

    gas: scrubber handling of string continuation across lines
    
    Apparently forever (according to [available] history) two backslashes have
    been emitted when, afaict, only one was meant.

Diff:
---
 gas/app.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gas/app.c b/gas/app.c
index 3410e696572..e5b65bc0152 100644
--- a/gas/app.c
+++ b/gas/app.c
@@ -694,12 +694,12 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen,
 	  ch = GET ();
 	  switch (ch)
 	    {
-	      /* Handle strings broken across lines, by turning '\n' into
-		 '\\' and 'n'.  */
+	      /* Handle strings broken across lines, by turning '\\' followed
+		 by '\n' into '\\' (already emitted when state moved to 6) and
+		 'n'.  */
 	    case '\n':
-	      UNGET ('n');
 	      add_newlines++;
-	      PUT ('\\');
+	      PUT ('n');
 	      continue;
 
 	    case EOF:


More information about the Binutils-cvs mailing list