else if (strchr (arginfo, '*') != 0)
{
- error ("incomplete '%s' option", option_map[j].name);
+ error ("incomplete %qs option", option_map[j].name);
break;
}
{
if (i + 1 == argc)
{
- error ("missing argument to '%s' option",
+ error ("missing argument to %qs option",
option_map[j].name);
break;
}
else if (strchr (arginfo, 'o') == 0)
{
if (arg != 0)
- error ("extraneous argument to '%s' option",
+ error ("extraneous argument to %qs option",
option_map[j].name);
arg = 0;
}
for (newsl = specs; newsl; newsl = newsl->next)
if (strcmp (newsl->name, p2) == 0)
- fatal_error ("%s: attempt to rename spec '%s' to "
- "already defined spec '%s'",
+ fatal_error ("%s: attempt to rename spec %qs to "
+ "already defined spec %qs",
filename, p1, p2);
if (verbose_flag)
int require_machine_suffix, int os_multilib)
{
if (!IS_ABSOLUTE_PATH (prefix))
- fatal_error ("system path '%s' is not absolute", prefix);
+ fatal_error ("system path %qs is not absolute", prefix);
if (target_system_root)
{
? PEX_RECORD_TIMES : 0),
progname, temp_filename);
if (pex == NULL)
- pfatal_with_name (_("pex_init failed"));
+ fatal_error ("pex_init failed: %m");
for (i = 0; i < n_commands; i++)
{
statuses = (int *) alloca (n_commands * sizeof (int));
if (!pex_get_status (pex, n_commands, statuses))
- pfatal_with_name (_("failed to get exit status"));
+ fatal_error ("failed to get exit status: %m");
if (report_times || report_times_to_file)
{
times = (struct pex_time *) alloca (n_commands * sizeof (struct pex_time));
if (!pex_get_times (pex, n_commands, times))
- pfatal_with_name (_("failed to get process times"));
+ fatal_error ("failed to get process times: %m");
}
pex_free (pex);
else if (strcmp (argv[i], "-Xlinker") == 0)
{
if (i + 1 == argc)
- fatal_error ("argument to '-Xlinker' is missing");
+ fatal_error ("argument to %<-Xlinker%> is missing");
n_infiles++;
i++;
else if (strcmp (argv[i], "-Xpreprocessor") == 0)
{
if (i + 1 == argc)
- fatal_error ("argument to '-Xpreprocessor' is missing");
+ fatal_error ("argument to %<-Xpreprocessor%> is missing");
add_preprocessor_option (argv[i+1], strlen (argv[i+1]));
}
else if (strcmp (argv[i], "-Xassembler") == 0)
{
if (i + 1 == argc)
- fatal_error ("argument to '-Xassembler' is missing");
+ fatal_error ("argument to %<-Xassembler%> is missing");
add_assembler_option (argv[i+1], strlen (argv[i+1]));
}
else if (strcmp (argv[i], "-l") == 0)
{
if (i + 1 == argc)
- fatal_error ("argument to '-l' is missing");
+ fatal_error ("argument to %<-l%> is missing");
n_infiles++;
i++;
|| strcmp (argv[i]+12, "object") == 0)
save_temps_flag = SAVE_TEMPS_OBJ;
else
- fatal_error ("'%s' is an unknown -save-temps option", argv[i]);
+ fatal_error ("%qs is an unknown -save-temps option", argv[i]);
}
else if (strcmp (argv[i], "-no-canonical-prefixes") == 0)
/* Already handled as a special case, so ignored here. */
{
struct user_specs *user = XNEW (struct user_specs);
if (++i >= argc)
- fatal_error ("argument to '-specs' is missing");
+ fatal_error ("argument to %<-specs%> is missing");
user->next = (struct user_specs *) 0;
user->filename = argv[i];
{
struct user_specs *user = XNEW (struct user_specs);
if (strlen (argv[i]) == 7)
- fatal_error ("argument to '-specs=' is missing");
+ fatal_error ("argument to %<-specs=%> is missing");
user->next = (struct user_specs *) 0;
user->filename = argv[i] + 7;
else if (strcmp (argv[i], "-wrapper") == 0)
{
if (++i >= argc)
- fatal_error ("argument to '-wrapper' is missing");
+ fatal_error ("argument to %<-wrapper%> is missing");
wrapper_string = argv[i];
n_switches++;
int len;
if (p[1] == 0 && i + 1 == argc)
- fatal_error ("argument to '-B' is missing");
+ fatal_error ("argument to %<-B%> is missing");
if (p[1] == 0)
value = argv[++i];
else
if (c == 'x')
{
if (p[1] == 0 && i + 1 == argc)
- fatal_error ("argument to '-x' is missing");
+ fatal_error ("argument to %<-x%> is missing");
if (p[1] == 0)
spec_lang = argv[++i];
else
n_args = SWITCH_TAKES_ARG (c) - (p[1] != 0);
}
if (i + n_args >= argc)
- fatal_error ("argument to '-%s' is missing", p);
+ fatal_error ("argument to %<-%s%> is missing", p);
switches[n_switches].args
= XNEWVEC (const char *, n_args + 1);
while (j < n_args)
}
if (n_infiles == last_language_n_infiles && spec_lang != 0)
- warning (0, "'-x %s' after last input file has no effect", spec_lang);
+ warning (0, "%<-x %s%> after last input file has no effect", spec_lang);
if (compare_debug == 2 || compare_debug == 3)
{
if (full_script_path == NULL)
{
- error ("unable to locate default linker script '%s' in the library search paths", string);
+ error ("unable to locate default linker script %qs in the library search paths", string);
/* Script was not found on search path. */
return;
}
/* Each switch should start with '-'. */
if (c != '-')
- fatal_error ("switch '%s' does not start with '-'", argbuf[i]);
+ fatal_error ("switch %qs does not start with %<-%>", argbuf[i]);
p++;
c = *p;
n_args = SWITCH_TAKES_ARG (c) - (p[1] != 0);
}
if (i + n_args >= argbuf_index)
- fatal_error ("argument to '-%s' is missing", p);
+ fatal_error ("argument to %<-%s%> is missing", p);
sw->args
= XNEWVEC (const char *, n_args + 1);
while (j < n_args)
switch (c = *p++)
{
case 0:
- fatal_error ("spec '%s' invalid", spec);
+ fatal_error ("spec %qs invalid", spec);
case 'b':
if (save_temps_length)
p += 2;
/* We don't support extra suffix characters after %O. */
if (*p == '.' || ISALNUM ((unsigned char) *p))
- fatal_error ("spec '%s' has invalid '%%0%c'", spec, *p);
+ fatal_error ("spec %qs has invalid %<%%0%c%>", spec, *p);
if (suffix_length == 0)
suffix = TARGET_OBJECT_SUFFIX;
else
int cur_index = argbuf_index;
/* Handle the {...} following the %W. */
if (*p != '{')
- fatal_error ("spec '%s' has invalid '%%W%c", spec, *p);
+ fatal_error ("spec %qs has invalid %<%%W%c%>", spec, *p);
p = handle_braces (p + 1);
if (p == 0)
return -1;
/* Skip past the option value and make a copy. */
if (*p != '{')
- fatal_error ("spec '%s' has invalid '%%x%c'", spec, *p);
+ fatal_error ("spec %qs has invalid %<%%x%c%>", spec, *p);
while (*p++ != '}')
;
string = save_string (p1 + 1, p - p1 - 2);
/* Catch the case where a spec string contains something like
'%{foo:%*}'. i.e. there is no * in the pattern on the left
hand side of the :. */
- error ("spec failure: '%%*' has not been initialized by pattern match");
+ error ("spec failure: %<%%*%> has not been initialized by pattern match");
break;
/* Process a string found as the value of a spec given by name.
break;
default:
- error ("spec failure: unrecognized spec option '%c'", c);
+ error ("spec failure: unrecognized spec option %qc", c);
break;
}
break;
sf = lookup_spec_function (func);
if (sf == NULL)
- fatal_error ("unknown spec function '%s'", func);
+ fatal_error ("unknown spec function %qs", func);
/* Push the spec processing context. */
save_argbuf_index = argbuf_index;
alloc_args ();
if (do_spec_2 (args) < 0)
- fatal_error ("error in args to spec function '%s'", func);
+ fatal_error ("error in args to spec function %qs", func);
/* argbuf_index is an index for the next argument to be inserted, and
so contains the count of the args already inserted. */
return p;
invalid:
- fatal_error ("braced spec '%s' is invalid at '%c'", orig, *p);
+ fatal_error ("braced spec %qs is invalid at %qc", orig, *p);
#undef SKIP_WHITE
}
return p;
invalid:
- fatal_error ("braced spec body '%s' is invalid", body);
+ fatal_error ("braced spec body %qs is invalid", body);
}
\f
/* Return 0 iff switch number SWITCHNUM is obsoleted by a later switch
for (i = 0; (int) i < n_switches; i++)
if (! switches[i].validated)
- error ("unrecognized option '-%s'", switches[i].part1);
+ error ("unrecognized option %<-%s%>", switches[i].part1);
/* Obey some of the options. */
value = do_spec (input_file_compiler->spec);
infiles[i].preprocessed = true;
if (!have_o_argbuf_index)
- fatal_error ("spec '%s' is invalid",
+ fatal_error ("spec %qs is invalid",
input_file_compiler->spec);
infiles[i].name = argbuf[have_o_argbuf_index];
infiles[i].incompiler
static void
perror_with_name (const char *name)
{
- error ("%s: %s", name, xstrerror (errno));
+ error ("%s: %m", name);
}
\f
static inline void
if (*q == '\0')
{
invalid_matches:
- fatal_error ("multilib spec '%s' is invalid",
+ fatal_error ("multilib spec %qs is invalid",
multilib_matches);
}
q++;
if (*p == '\0')
{
invalid_exclusions:
- fatal_error ("multilib exclusions '%s' is invalid",
+ fatal_error ("multilib exclusions %qs is invalid",
multilib_exclusions);
}
if (*p == '\0')
{
invalid_select:
- fatal_error ("multilib select '%s' is invalid",
+ fatal_error ("multilib select %qs is invalid",
multilib_select);
}
++p;
if (*p == '\0')
{
invalid_select:
- fatal_error ("multilib select '%s' is invalid", multilib_select);
+ fatal_error ("multilib select %qs is invalid", multilib_select);
}
++p;
if (*e == '\0')
{
invalid_exclusion:
- fatal_error ("multilib exclusion '%s' is invalid",
+ fatal_error ("multilib exclusion %qs is invalid",
multilib_exclusions);
}
value = getenv (argv[0]);
if (!value)
- fatal_error ("environment variable \"%s\" not defined", argv[0]);
+ fatal_error ("environment variable %qs not defined", argv[0]);
/* We have to escape every character of the environment variable so
they are not interpreted as active spec characters. A
abort ();
rresult = regexec (&r, v1, 0, NULL, 0);
if (rresult == REG_NOMATCH)
- fatal_error ("invalid version number `%s'", v1);
+ fatal_error ("invalid version number %qs", v1);
else if (rresult != 0)
abort ();
rresult = regexec (&r, v2, 0, NULL, 0);
if (rresult == REG_NOMATCH)
- fatal_error ("invalid version number `%s'", v2);
+ fatal_error ("invalid version number %qs", v2);
else if (rresult != 0)
abort ();
break;
default:
- fatal_error ("unknown operator '%s' in %%:version-compare", argv[0]);
+ fatal_error ("unknown operator %qs in %%:version-compare", argv[0]);
}
if (! result)
return NULL;