(dump_defn_1): Skip newlines and strings correctly.
authorRichard Kenner <kenner@gcc.gnu.org>
Thu, 11 Aug 1994 18:23:38 +0000 (14:23 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 11 Aug 1994 18:23:38 +0000 (14:23 -0400)
From-SVN: r7893

gcc/cccp.c

index c0678d01f2f8e4fac7b83fc76d4500c55db6ae53..1a9f6603f4e741c2e796e155e5e08e8d571c8703 100644 (file)
@@ -8991,15 +8991,16 @@ dump_defn_1 (base, start, length, of)
   U_CHAR *limit = base + start + length;
 
   while (p < limit) {
-    if (*p != '\n')
-      putc (*p, of);
-    else if (*p == '\"' || *p =='\'') {
+    if (*p == '\"' || *p =='\'') {
       U_CHAR *p1 = skip_quoted_string (p, limit, 0, NULL_PTR,
                                       NULL_PTR, NULL_PTR);
       fwrite (p, p1 - p, 1, of);
-      p = p1 - 1;
+      p = p1;
+    } else {
+      if (*p != '\n')
+       putc (*p, of);
+      p++;
     }
-    p++;
   }
 }