On 9/11/18 3:58 PM, Joseph Myers wrote:
I'd expect all the cases where you pass a string containing '%s' to the
generic diagnostic functions to use %qs instead of '%s' for quoting, to
get appropriate locale-specific quotes.

yes of course, slipped my mind.

Committed the attached after manual testing.

nathan

--
Nathan Sidwell
2018-09-11  Nathan Sidwell  <nat...@acm.org>

	* gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.

Index: gcc.c
===================================================================
--- gcc.c	(revision 264216)
+++ gcc.c	(working copy)
@@ -2102,7 +2102,7 @@ load_specs (const char *filename)
     {
     failed:
       /* This leaves DESC open, but the OS will save us.  */
-      fatal_error (input_location, "cannot read spec file '%s': %m", filename);
+      fatal_error (input_location, "cannot read spec file %qs: %m", filename);
     }
 
   if (stat (filename, &statbuf) < 0)
@@ -3174,8 +3174,8 @@ execute (void)
 	{
 	  errno = err;
 	  fatal_error (input_location,
-		       err ? G_("cannot execute '%s' %s: %m")
-		       : G_("cannot execute '%s' %s"),
+		       err ? G_("cannot execute %qs: %s: %m")
+		       : G_("cannot execute %qs: %s"),
 		       string, errmsg);
 	}
 
@@ -6887,8 +6887,8 @@ run_attempt (const char **new_argv, cons
     {
       errno = err;
       fatal_error (input_location,
-		   err ? G_ ("cannot execute '%s' %s: %m")
-		   : G_ ("cannot execute '%s' %s"),
+		   err ? G_ ("cannot execute %qs: %s: %m")
+		   : G_ ("cannot execute %qs: %s"),
 		   new_argv[0], errmsg);
     }
 

Reply via email to