aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm@polyomino.org.uk>2004-09-15 21:48:10 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2004-09-15 21:48:10 +0100
commit971801fff6d8eb0df1486fa6b77ba4cfc4616305 (patch)
tree4034f8306b245baf4a83c67767977aaa06c4a83b /gcc/toplev.c
parent1daf6f3a5ba3a54bde4b8843b7b75dad3bb536eb (diff)
downloadgcc-971801fff6d8eb0df1486fa6b77ba4cfc4616305.zip
gcc-971801fff6d8eb0df1486fa6b77ba4cfc4616305.tar.gz
gcc-971801fff6d8eb0df1486fa6b77ba4cfc4616305.tar.bz2
attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c.
gcc: * attribs.c, builtins.c, c-format.c, c-pch.c, coverage.c, except.c, fold-const.c, function.c, langhooks.c, params.c, reload.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c, tree-dump.c, tree-mudflap.c, tree.c, varasm.c: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c. Use '' for quoting in other diagnostic text. * langhooks.c: Include intl.h. Mark text locating diagnostics for translation. * Makefile.in (langhooks.o): Update dependencies. * pretty-print.h (pp_printf): Mark as accepting GCC diagnostic formats. gcc/testsuite: * g++.dg/ext/member-attr.C, g++.dg/warn/deprecated.C, gcc.dg/deprecated.c, gcc.dg/noreturn-1.c, gcc.dg/noreturn-4.c: Update expected messages. libmudflap: * testsuite/libmudflap.c/pass35-frag.c: Update expected message. From-SVN: r87563
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 1dbe25d..848bfca 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -534,7 +534,7 @@ read_integral_parameter (const char *p, const char *pname, const int defval)
if (*endp != 0)
{
if (pname != 0)
- error ("invalid option argument `%s'", pname);
+ error ("invalid option argument %qs", pname);
return defval;
}
@@ -840,9 +840,10 @@ check_global_declarations (tree *vec, int len)
|| TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))))
{
if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
- pedwarn ("%J'%F' used but never defined", decl, decl);
+ pedwarn ("%J%qF used but never defined", decl, decl);
else
- warning ("%J'%F' declared `static' but never defined", decl, decl);
+ warning ("%J%qF declared %<static%> but never defined",
+ decl, decl);
/* This symbol is effectively an "extern" declaration now. */
TREE_PUBLIC (decl) = 1;
assemble_external (decl);
@@ -867,7 +868,7 @@ check_global_declarations (tree *vec, int len)
&& ! (TREE_CODE (decl) == VAR_DECL && DECL_REGISTER (decl))
/* Otherwise, ask the language. */
&& lang_hooks.decls.warn_unused_global (decl))
- warning ("%J'%D' defined but not used", decl, decl);
+ warning ("%J%qD defined but not used", decl, decl);
/* Avoid confusing the debug information machinery when there are
errors. */
@@ -890,7 +891,7 @@ warn_deprecated_use (tree node)
if (DECL_P (node))
{
expanded_location xloc = expand_location (DECL_SOURCE_LOCATION (node));
- warning ("`%s' is deprecated (declared at %s:%d)",
+ warning ("%qs is deprecated (declared at %s:%d)",
IDENTIFIER_POINTER (DECL_NAME (node)),
xloc.file, xloc.line);
}
@@ -913,7 +914,7 @@ warn_deprecated_use (tree node)
expanded_location xloc
= expand_location (DECL_SOURCE_LOCATION (decl));
if (what)
- warning ("`%s' is deprecated (declared at %s:%d)", what,
+ warning ("%qs is deprecated (declared at %s:%d)", what,
xloc.file, xloc.line);
else
warning ("type is deprecated (declared at %s:%d)",
@@ -922,7 +923,7 @@ warn_deprecated_use (tree node)
else
{
if (what)
- warning ("`%s' is deprecated", what);
+ warning ("%qs is deprecated", what);
else
warning ("type is deprecated");
}
@@ -1216,7 +1217,7 @@ set_target_switch (const char *name)
#endif
if (!valid_target_option)
- error ("invalid option `%s'", name);
+ error ("invalid option %qs", name);
}
/* Print version information to FILE.
@@ -1393,7 +1394,7 @@ init_asm_output (const char *name)
else
asm_out_file = fopen (asm_file_name, "w+b");
if (asm_out_file == 0)
- fatal_error ("can't open %s for writing: %m", asm_file_name);
+ fatal_error ("can%'t open %s for writing: %m", asm_file_name);
}
#ifdef IO_BUFFER_SIZE
@@ -1529,7 +1530,7 @@ default_pch_valid_p (const void *data_p, size_t len)
make_message:
{
char *r;
- asprintf (&r, _("created and used with differing settings of `-m%s'"),
+ asprintf (&r, _("created and used with differing settings of '-m%s'"),
flag_that_differs);
if (r == NULL)
return _("out of memory");
@@ -1861,7 +1862,7 @@ process_options (void)
{
aux_info_file = fopen (aux_info_file_name, "w");
if (aux_info_file == 0)
- fatal_error ("can't open %s: %m", aux_info_file_name);
+ fatal_error ("can%'t open %s: %m", aux_info_file_name);
}
if (! targetm.have_named_sections)