re PR bootstrap/79567 (Compiler-warning "unknown escape sequence '\x'" about genmatch...
authorRichard Biener <rguenther@suse.de>
Fri, 17 Feb 2017 10:19:21 +0000 (10:19 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 17 Feb 2017 10:19:21 +0000 (10:19 +0000)
2017-02-17  Richard Biener  <rguenther@suse.de>

PR bootstrap/79567
* genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.

From-SVN: r245527

gcc/ChangeLog
gcc/genmatch.c

index b7d0d8ed436f8e6f5983cf29451124ceaaa16460..96ae59a0a7e3cf197e27a37c17b47799f5c8d7c8 100644 (file)
@@ -1,3 +1,8 @@
+2017-02-17  Richard Biener  <rguenther@suse.de>
+
+       PR bootstrap/79567
+       * genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.
+
 2017-02-17  Marek Polacek  <polacek@redhat.com>
 
        PR middle-end/79536
index c163ded68764a4a0e6623774c0a22f2523673683..fdf5aafb4527e423d34bea6cec72cd6ef6e17eb0 100644 (file)
@@ -192,6 +192,11 @@ output_line_directive (FILE *f, source_location location,
     {
       /* When writing to a dumpfile only dump the filename.  */
       const char *file = strrchr (loc.file, DIR_SEPARATOR);
+#if defined(DIR_SEPARATOR_2)
+      const char *pos2 = strrchr (loc.file, DIR_SEPARATOR_2);
+      if (pos2 && (!file || (pos2 > file)))
+       file = pos2;
+#endif
       if (!file)
        file = loc.file;
       else