This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR79567


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]