PR gas/11356
authorAlan Modra <amodra@gmail.com>
Tue, 9 Mar 2010 00:41:24 +0000 (00:41 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 9 Mar 2010 00:41:24 +0000 (00:41 +0000)
* listing.c (listing_newline): Correct backslash quote logic.

gas/ChangeLog
gas/listing.c

index cd9149d39b2b6019948c69a0516f019bcc7a21a7..a4f73008b0db31be148e79607c81b7e39caeae5c 100644 (file)
@@ -1,3 +1,8 @@
+2010-03-09  Alan Modra  <amodra@gmail.com>
+
+       PR gas/11356
+       * listing.c (listing_newline): Correct backslash quote logic.
+
 2010-03-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * config/tc-i386.h [TE_SOLARIS] (ELF_TARGET_FORMAT): Define.
index 9a71c76354e51459b6843cf8e3c5be7eeb7b5fa4..002b3c595865afced03cf4a403ce9d9a85a8ab02 100644 (file)
@@ -347,10 +347,12 @@ listing_newline (char *ps)
                         || is_end_of_line [(unsigned char) *copy] != 1);
               copy++)
            {
-             if (*copy == '\\')
-               seen_slash = ! seen_slash;
-             else if (*copy == '"' && seen_slash)
-               seen_quote = ! seen_quote;
+             if (seen_slash)
+               seen_slash = 0;
+             else if (*copy == '\\')
+               seen_slash = 1;
+             else if (*copy == '"')
+               seen_quote = !seen_quote;
            }
 
          len = copy - input_line_pointer + 1;