This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR79567
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 17 Feb 2017 10:45:13 +0100 (CET)
- Subject: [PATCH] Fix PR79567
- Authentication-results: sourceware.org; auth=none
I am boostrapping the following to fix reported warnings about
bogus escape chars on mingw32 for genmatch output. Reporter
tested this on mingw.
Will commit after bootstrap on x86_64-unknown-linux-gnu finished
(well, somewhat pointless, DIR_SEPARATOR_2 is not defined there).
Richard.
2017-02-17 Richard Biener <rguenther@suse.de>
PR bootstrap/79567
* genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.
Index: gcc/genmatch.c
===================================================================
--- gcc/genmatch.c (revision 245501)
+++ gcc/genmatch.c (working copy)
@@ -192,6 +192,11 @@ output_line_directive (FILE *f, source_l
{
/* 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