aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-06-04 19:52:50 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2010-06-04 19:52:50 +0100
commitbdc6b402f90bde66ba88df483f4f8758f656f840 (patch)
tree85f9769f6f35ad83dbcf67a01979ddd019a890fb
parent2aa6496608edeb128e5d36b2a9ac02d8d7d6fc18 (diff)
downloadgcc-bdc6b402f90bde66ba88df483f4f8758f656f840.zip
gcc-bdc6b402f90bde66ba88df483f4f8758f656f840.tar.gz
gcc-bdc6b402f90bde66ba88df483f4f8758f656f840.tar.bz2
darwin-driver.c (darwin_default_min_version): Use
* config/darwin-driver.c (darwin_default_min_version): Use * GCC-specific formats in diagnostics. * cppspec.c (lang_specific_driver): Use GCC-specific formats in diagnostics. * gcc.c (translate_options, read_specs, add_sysrooted_prefix, execute, process_command, end_going_arg, do_self_spec, do_spec_1, eval_spec_function, handle_braces, process_brace_body, main, perror_with_name, used_arg, set_multilib_dir, print_multilib_info, getenv_spec_function, compare_version_strings, version_compare_spec_function): Use GCC-specific formats in diagnostics. cp: * g++spec.c (lang_specific_driver): Use GCC-specific formats in diagnostics. fortran: * gfortranspec.c (append_arg, lang_specific_driver): Use GCC-specific formats in diagnostics. java: * jvspec.c (lang_specific_driver): Use GCC-specific formats in diagnostics. From-SVN: r160292
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/config/darwin-driver.c5
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/g++spec.c2
-rw-r--r--gcc/cppspec.c2
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/gfortranspec.c6
-rw-r--r--gcc/gcc.c92
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/jvspec.c8
10 files changed, 86 insertions, 58 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 978b57a..21fe05a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,17 @@
+2010-06-04 Joseph Myers <joseph@codesourcery.com>
+
+ * config/darwin-driver.c (darwin_default_min_version): Use
+ * GCC-specific formats in diagnostics.
+ * cppspec.c (lang_specific_driver): Use GCC-specific formats in
+ diagnostics.
+ * gcc.c (translate_options, read_specs, add_sysrooted_prefix,
+ execute, process_command, end_going_arg, do_self_spec, do_spec_1,
+ eval_spec_function, handle_braces, process_brace_body, main,
+ perror_with_name, used_arg, set_multilib_dir, print_multilib_info,
+ getenv_spec_function, compare_version_strings,
+ version_compare_spec_function): Use GCC-specific formats in
+ diagnostics.
+
2010-06-04 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*addhi_1_lea) <TYPE_INCDEC, default>: Assert
diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c
index 0997e0a..f66e5a0 100644
--- a/gcc/config/darwin-driver.c
+++ b/gcc/config/darwin-driver.c
@@ -107,8 +107,7 @@ darwin_default_min_version (int * argc_p, char *** argv_p)
if (sysctl (osversion_name, ARRAY_SIZE (osversion_name), osversion,
&osversion_len, NULL, 0) == -1)
{
- warning (0, "sysctl for kern.osversion failed: %s",
- xstrerror (errno));
+ warning (0, "sysctl for kern.osversion failed: %m");
return;
}
@@ -151,7 +150,7 @@ darwin_default_min_version (int * argc_p, char *** argv_p)
return;
parse_failed:
- warning (0, "couldn't understand kern.osversion `%.*s'",
+ warning (0, "couldn't understand kern.osversion %q.*s",
(int) osversion_len, osversion);
return;
}
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c54ed02..3d77501 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-04 Joseph Myers <joseph@codesourcery.com>
+
+ * g++spec.c (lang_specific_driver): Use GCC-specific formats in
+ diagnostics.
+
2010-06-04 Jakub Jelinek <jakub@redhat.com>
PR c++/44412
diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
index f33affc..2b8081d 100644
--- a/gcc/cp/g++spec.c
+++ b/gcc/cp/g++spec.c
@@ -258,7 +258,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
}
if (quote)
- fatal_error ("argument to '%s' missing\n", quote);
+ fatal_error ("argument to %qs missing", quote);
/* There's no point adding -shared-libgcc if we don't have a shared
libgcc. */
diff --git a/gcc/cppspec.c b/gcc/cppspec.c
index dfae81e..c3adaa1 100644
--- a/gcc/cppspec.c
+++ b/gcc/cppspec.c
@@ -103,7 +103,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
need_E = 0;
else if (argv[i][1] == 'S' || argv[i][1] == 'c')
{
- fatal_error ("\"%s\" is not a valid option to the "
+ fatal_error ("%qs is not a valid option to the "
"preprocessor", argv[i]);
return;
}
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 0db8ce5..3830da9 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-04 Joseph Myers <joseph@codesourcery.com>
+
+ * gfortranspec.c (append_arg, lang_specific_driver): Use
+ GCC-specific formats in diagnostics.
+
2010-06-02 Tobias Burnus <burnus@net-b.de>
PR fortran/44360
diff --git a/gcc/fortran/gfortranspec.c b/gcc/fortran/gfortranspec.c
index 1f67acc1..899cbc5 100644
--- a/gcc/fortran/gfortranspec.c
+++ b/gcc/fortran/gfortranspec.c
@@ -244,7 +244,7 @@ append_arg (const char *arg)
}
if (g77_newargc == newargsize)
- fatal_error ("overflowed output arg list for '%s'", arg);
+ fatal_error ("overflowed output arg list for %qs", arg);
g77_newargv[g77_newargc++] = arg;
}
@@ -402,7 +402,7 @@ For more information about these matters, see the file named COPYING\n\n"));
if (i + skip < argc)
i += skip;
else
- fatal_error ("argument to '%s' missing", argv[i]);
+ fatal_error ("argument to %qs missing", argv[i]);
}
if ((n_outfiles != 0) && (n_infiles == 0))
@@ -440,7 +440,7 @@ For more information about these matters, see the file named COPYING\n\n"));
i++;
}
else
- fatal_error ("argument to '%s' missing", argv[i]);
+ fatal_error ("argument to %qs missing", argv[i]);
}
else
{
diff --git a/gcc/gcc.c b/gcc/gcc.c
index a199f02..75409af 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -1392,7 +1392,7 @@ translate_options (int *argcp, const char *const **argvp)
else if (strchr (arginfo, '*') != 0)
{
- error ("incomplete '%s' option", option_map[j].name);
+ error ("incomplete %qs option", option_map[j].name);
break;
}
@@ -1403,7 +1403,7 @@ translate_options (int *argcp, const char *const **argvp)
{
if (i + 1 == argc)
{
- error ("missing argument to '%s' option",
+ error ("missing argument to %qs option",
option_map[j].name);
break;
}
@@ -1416,7 +1416,7 @@ translate_options (int *argcp, const char *const **argvp)
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;
}
@@ -2281,8 +2281,8 @@ read_specs (const char *filename, int main_p)
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)
@@ -2907,7 +2907,7 @@ add_sysrooted_prefix (struct path_prefix *pprefix, const char *prefix,
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)
{
@@ -3095,7 +3095,7 @@ execute (void)
? 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++)
{
@@ -3134,13 +3134,13 @@ execute (void)
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);
@@ -3906,7 +3906,7 @@ process_command (int argc, const char **argv)
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++;
@@ -3914,21 +3914,21 @@ process_command (int argc, const char **argv)
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++;
@@ -3949,7 +3949,7 @@ process_command (int argc, const char **argv)
|| 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. */
@@ -3963,7 +3963,7 @@ process_command (int argc, const char **argv)
{
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];
@@ -3977,7 +3977,7 @@ process_command (int argc, const char **argv)
{
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;
@@ -4005,7 +4005,7 @@ process_command (int argc, const char **argv)
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++;
@@ -4033,7 +4033,7 @@ process_command (int argc, const char **argv)
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
@@ -4426,7 +4426,7 @@ process_command (int argc, const char **argv)
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
@@ -4454,7 +4454,7 @@ process_command (int argc, const char **argv)
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)
@@ -4543,7 +4543,7 @@ process_command (int argc, const char **argv)
}
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)
{
@@ -4706,7 +4706,7 @@ end_going_arg (void)
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;
}
@@ -4894,7 +4894,7 @@ do_self_spec (const char *spec)
/* 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;
@@ -4918,7 +4918,7 @@ do_self_spec (const char *spec)
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)
@@ -5124,7 +5124,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
switch (c = *p++)
{
case 0:
- fatal_error ("spec '%s' invalid", spec);
+ fatal_error ("spec %qs invalid", spec);
case 'b':
if (save_temps_length)
@@ -5273,7 +5273,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
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
@@ -5584,7 +5584,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
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;
@@ -5604,7 +5604,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
/* 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);
@@ -5799,7 +5799,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
/* 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.
@@ -5889,7 +5889,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
break;
default:
- error ("spec failure: unrecognized spec option '%c'", c);
+ error ("spec failure: unrecognized spec option %qc", c);
break;
}
break;
@@ -5951,7 +5951,7 @@ eval_spec_function (const char *func, const char *args)
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;
@@ -5971,7 +5971,7 @@ eval_spec_function (const char *func, const char *args)
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. */
@@ -6288,7 +6288,7 @@ handle_braces (const char *p)
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
}
@@ -6376,7 +6376,7 @@ process_brace_body (const char *p, const char *atom, const char *end_atom,
return p;
invalid:
- fatal_error ("braced spec body '%s' is invalid", body);
+ fatal_error ("braced spec body %qs is invalid", body);
}
/* Return 0 iff switch number SWITCHNUM is obsoleted by a later switch
@@ -7074,7 +7074,7 @@ main (int argc, char **argv)
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. */
@@ -7317,7 +7317,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
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
@@ -7654,7 +7654,7 @@ pfatal_with_name (const char *name)
static void
perror_with_name (const char *name)
{
- error ("%s: %s", name, xstrerror (errno));
+ error ("%s: %m", name);
}
static inline void
@@ -7809,7 +7809,7 @@ used_arg (const char *p, int len)
if (*q == '\0')
{
invalid_matches:
- fatal_error ("multilib spec '%s' is invalid",
+ fatal_error ("multilib spec %qs is invalid",
multilib_matches);
}
q++;
@@ -8001,7 +8001,7 @@ set_multilib_dir (void)
if (*p == '\0')
{
invalid_exclusions:
- fatal_error ("multilib exclusions '%s' is invalid",
+ fatal_error ("multilib exclusions %qs is invalid",
multilib_exclusions);
}
@@ -8059,7 +8059,7 @@ set_multilib_dir (void)
if (*p == '\0')
{
invalid_select:
- fatal_error ("multilib select '%s' is invalid",
+ fatal_error ("multilib select %qs is invalid",
multilib_select);
}
++p;
@@ -8200,7 +8200,7 @@ print_multilib_info (void)
if (*p == '\0')
{
invalid_select:
- fatal_error ("multilib select '%s' is invalid", multilib_select);
+ fatal_error ("multilib select %qs is invalid", multilib_select);
}
++p;
@@ -8238,7 +8238,7 @@ print_multilib_info (void)
if (*e == '\0')
{
invalid_exclusion:
- fatal_error ("multilib exclusion '%s' is invalid",
+ fatal_error ("multilib exclusion %qs is invalid",
multilib_exclusions);
}
@@ -8444,7 +8444,7 @@ getenv_spec_function (int argc, const char **argv)
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
@@ -8535,12 +8535,12 @@ compare_version_strings (const char *v1, const char *v2)
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 ();
@@ -8630,7 +8630,7 @@ version_compare_spec_function (int argc, const char **argv)
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;
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index f001cfb..4c73788 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-04 Joseph Myers <joseph@codesourcery.com>
+
+ * jvspec.c (lang_specific_driver): Use GCC-specific formats in
+ diagnostics.
+
2010-05-30 Steven Bosscher <steven@gcc.gnu.org>
* except.c: Include tm.h.
diff --git a/gcc/java/jvspec.c b/gcc/java/jvspec.c
index e197e28..1987138 100644
--- a/gcc/java/jvspec.c
+++ b/gcc/java/jvspec.c
@@ -400,13 +400,13 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
}
if (quote)
- fatal_error ("argument to '%s' missing\n", quote);
+ fatal_error ("argument to %qs missing", quote);
if (saw_D && ! main_class_name)
- fatal_error ("can't specify '-D' without '--main'\n");
+ fatal_error ("can't specify %<-D%> without %<--main%>");
if (main_class_name && ! verify_class_name (main_class_name))
- fatal_error ("'%s' is not a valid class name", main_class_name);
+ fatal_error ("%qs is not a valid class name", main_class_name);
num_args = argc + added;
if (saw_resource)
@@ -582,7 +582,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
if (strncmp (argv[i], "-fmain=", 7) == 0)
{
if (! will_link)
- fatal_error ("cannot specify 'main' class when not linking");
+ fatal_error ("cannot specify %<main%> class when not linking");
--j;
continue;
}