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]

Further diagnostics quoting patch


After fixing most C front end diagnostics not to use `' as matched
quotes, inconsistency in diagnostic style was rather visible because
of diagnostic text from elsewhere in the compiler, in particular "In
function `foo':", that hadn't been changed.  Thus this patch changes
many additional messages from the language and target independent
compiler to use %< %q %>.  I also noticed that the "In function
`foo':" wasn't marked for translation (pp_printf is a low-level
function that takes already translated text) so added those markings.

It would be convenient for other front-end maintainers (C++, ObjC,
Java, as Ada and Fortran don't use diagnostic.c) to go over their
front ends' diagnostics to change them to use %< %q %> for quoting
(and target maintainers likewise for target-specific diagnostics).

Messages that are formatted with plain printf or are arguments to
formats rather than formats themselves are changed to use '' quoting;
changing them to use the proper quotes in English with UTF-8 (subject
to fix of bug 15575) is more work, can be done separately and '' is an
improvement on `'.  For messages from programs run only during build,
'' is the proper final state; `' should be eliminated but in such
cases there's no point in improving on plain ASCII ''.  However, I
haven't touched such programs at this point.  Miscellaneous programs
installed that don't use diagnostic.c but plain printf instead also
need to stop at '' for now.

General list of things to be done in this regard remains as previously
<http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01189.html>.  Perhaps
those dealing with comment spelling and formatting would like to
include the use of ` as a left quote among the things to fix in
comments (and everywhere apart from Texinfo manuals)?  I expect even
if removed it will resurface and need fixing again from time to time.

Bootstrapped with no regressions on i686-pc-linux-gnu.  OK to commit?
(I'd regenerate gcc.pot after committing; it will provide a useful
indication of what messages are left using `.)

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
  http://www.srcf.ucam.org/~jsm28/gcc/#c90status - status of C90 for GCC 4.0
    jsm@polyomino.org.uk (personal mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)

2004-09-15  Joseph S. Myers  <jsm@polyomino.org.uk>

	* 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.

testsuite:
2004-09-15  Joseph S. Myers  <jsm@polyomino.org.uk>

	* 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:
2004-09-15  Joseph S. Myers  <jsm@polyomino.org.uk>

	* testsuite/libmudflap.c/pass35-frag.c: Update expected message.

diff -rupN GCC.orig/gcc/Makefile.in GCC/gcc/Makefile.in
--- GCC.orig/gcc/Makefile.in	2004-09-14 08:20:37.000000000 +0000
+++ GCC/gcc/Makefile.in	2004-09-15 13:52:40.000000000 +0000
@@ -1577,7 +1577,7 @@ convert.o: convert.c $(CONFIG_H) $(SYSTE
 
 langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) toplev.h \
    tree-inline.h $(RTL_H) insn-config.h $(INTEGRATE_H) langhooks.h \
-   $(LANGHOOKS_DEF_H) $(FLAGS_H) $(GGC_H) diagnostic.h
+   $(LANGHOOKS_DEF_H) $(FLAGS_H) $(GGC_H) diagnostic.h intl.h
 tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
    $(FLAGS_H) function.h $(PARAMS_H) \
    toplev.h $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h \
diff -rupN GCC.orig/gcc/attribs.c GCC/gcc/attribs.c
--- GCC.orig/gcc/attribs.c	2004-08-31 08:26:47.000000000 +0000
+++ GCC/gcc/attribs.c	2004-09-15 11:53:26.000000000 +0000
@@ -172,7 +172,7 @@ decl_attributes (tree *node, tree attrib
 
       if (spec == NULL)
 	{
-	  warning ("`%s' attribute directive ignored",
+	  warning ("%qs attribute directive ignored",
 		   IDENTIFIER_POINTER (name));
 	  continue;
 	}
@@ -180,7 +180,7 @@ decl_attributes (tree *node, tree attrib
 	       || (spec->max_length >= 0
 		   && list_length (args) > spec->max_length))
 	{
-	  error ("wrong number of arguments specified for `%s' attribute",
+	  error ("wrong number of arguments specified for %qs attribute",
 		 IDENTIFIER_POINTER (name));
 	  continue;
 	}
@@ -197,7 +197,7 @@ decl_attributes (tree *node, tree attrib
 	    }
 	  else
 	    {
-	      warning ("`%s' attribute does not apply to types",
+	      warning ("%qs attribute does not apply to types",
 		       IDENTIFIER_POINTER (name));
 	      continue;
 	    }
@@ -243,7 +243,7 @@ decl_attributes (tree *node, tree attrib
 	  if (TREE_CODE (*anode) != FUNCTION_TYPE
 	      && TREE_CODE (*anode) != METHOD_TYPE)
 	    {
-	      warning ("`%s' attribute only applies to function types",
+	      warning ("%qs attribute only applies to function types",
 		       IDENTIFIER_POINTER (name));
 	      continue;
 	    }
diff -rupN GCC.orig/gcc/builtins.c GCC/gcc/builtins.c
--- GCC.orig/gcc/builtins.c	2004-09-15 08:50:02.000000000 +0000
+++ GCC/gcc/builtins.c	2004-09-15 12:06:58.000000000 +0000
@@ -924,7 +924,7 @@ expand_builtin_prefetch (tree arglist)
   /* Argument 1 (read/write flag) must be a compile-time constant int.  */
   if (TREE_CODE (arg1) != INTEGER_CST)
     {
-      error ("second arg to `__builtin_prefetch' must be a constant");
+      error ("second arg to %<__builtin_prefetch%> must be a constant");
       arg1 = integer_zero_node;
     }
   op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0);
@@ -938,7 +938,7 @@ expand_builtin_prefetch (tree arglist)
   /* Argument 2 (locality) must be a compile-time constant int.  */
   if (TREE_CODE (arg2) != INTEGER_CST)
     {
-      error ("third arg to `__builtin_prefetch' must be a constant");
+      error ("third arg to %<__builtin_prefetch%> must be a constant");
       arg2 = integer_zero_node;
     }
   op2 = expand_expr (arg2, NULL_RTX, VOIDmode, 0);
@@ -4147,19 +4147,19 @@ expand_builtin_args_info (tree arglist)
   if (arglist != 0)
     {
       if (!host_integerp (TREE_VALUE (arglist), 0))
-	error ("argument of `__builtin_args_info' must be constant");
+	error ("argument of %<__builtin_args_info%> must be constant");
       else
 	{
 	  HOST_WIDE_INT wordnum = tree_low_cst (TREE_VALUE (arglist), 0);
 
 	  if (wordnum < 0 || wordnum >= nwords)
-	    error ("argument of `__builtin_args_info' out of range");
+	    error ("argument of %<__builtin_args_info%> out of range");
 	  else
 	    return GEN_INT (word_ptr[wordnum]);
 	}
     }
   else
-    error ("missing argument in `__builtin_args_info'");
+    error ("missing argument in %<__builtin_args_info%>");
 
   return const0_rtx;
 }
@@ -4175,7 +4175,7 @@ expand_builtin_next_arg (tree arglist)
       || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
 	  == void_type_node))
     {
-      error ("`va_start' used in function with fixed args");
+      error ("%<va_start%> used in function with fixed args");
       return const0_rtx;
     }
 
@@ -4194,12 +4194,12 @@ expand_builtin_next_arg (tree arglist)
 	     || TREE_CODE (arg) == INDIRECT_REF)
 	arg = TREE_OPERAND (arg, 0);
       if (arg != last_parm)
-	warning ("second parameter of `va_start' not last named argument");
+	warning ("second parameter of %<va_start%> not last named argument");
     }
   else
     /* Evidently an out of date version of <stdarg.h>; can't validate
        va_start's second argument, but can still work as intended.  */
-    warning ("`__builtin_next_arg' called without an argument");
+    warning ("%<__builtin_next_arg%> called without an argument");
 
   return expand_binop (Pmode, add_optab,
 		       current_function_internal_arg_pointer,
@@ -4284,7 +4284,7 @@ expand_builtin_va_start (tree arglist)
   chain = TREE_CHAIN (arglist);
 
   if (TREE_CHAIN (chain))
-    error ("too many arguments to function `va_start'");
+    error ("too many arguments to function %<va_start%>");
 
   nextarg = expand_builtin_next_arg (chain);
   valist = stabilize_va_list (TREE_VALUE (arglist), 1);
@@ -4430,7 +4430,7 @@ gimplify_va_arg_expr (tree *expr_p, tree
 
   if (TYPE_MAIN_VARIANT (want_va_type) != TYPE_MAIN_VARIANT (have_va_type))
     {
-      error ("first argument to `va_arg' not of type `va_list'");
+      error ("first argument to %<va_arg%> not of type %<va_list%>");
       return GS_ERROR;
     }
 
@@ -4444,12 +4444,12 @@ gimplify_va_arg_expr (tree *expr_p, tree
       /* Unfortunately, this is merely undefined, rather than a constraint
 	 violation, so we cannot make this an error.  If this call is never
 	 executed, the program is still strictly conforming.  */
-      warning ("`%T' is promoted to `%T' when passed through `...'",
+      warning ("%qT is promoted to %qT when passed through %<...%>",
 	       type, promoted_type);
       if (! gave_help)
 	{
 	  gave_help = true;
-	  warning ("(so you should pass `%T' not `%T' to `va_arg')",
+	  warning ("(so you should pass %qT not %qT to %<va_arg%>)",
 		   promoted_type, type);
 	}
 
@@ -4573,9 +4573,9 @@ expand_builtin_frame_address (tree fndec
   else if (! host_integerp (TREE_VALUE (arglist), 1))
     {
       if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_FRAME_ADDRESS)
-	error ("invalid arg to `__builtin_frame_address'");
+	error ("invalid arg to %<__builtin_frame_address%>");
       else
-	error ("invalid arg to `__builtin_return_address'");
+	error ("invalid arg to %<__builtin_return_address%>");
       return const0_rtx;
     }
   else
@@ -4589,9 +4589,9 @@ expand_builtin_frame_address (tree fndec
       if (tem == NULL)
 	{
 	  if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_FRAME_ADDRESS)
-	    warning ("unsupported arg to `__builtin_frame_address'");
+	    warning ("unsupported arg to %<__builtin_frame_address%>");
 	  else
-	    warning ("unsupported arg to `__builtin_return_address'");
+	    warning ("unsupported arg to %<__builtin_return_address%>");
 	  return const0_rtx;
 	}
 
@@ -4757,7 +4757,7 @@ expand_builtin_expect (tree arglist, rtx
 
   if (TREE_CODE (c) != INTEGER_CST)
     {
-      error ("second arg to `__builtin_expect' must be a constant");
+      error ("second arg to %<__builtin_expect%> must be a constant");
       c = integer_zero_node;
     }
 
@@ -8040,19 +8040,19 @@ fold_builtin_classify (tree exp, int bui
       /* Check that we have exactly one argument.  */
       if (arglist == 0)
 	{
-	  error ("too few arguments to function `%s'",
+	  error ("too few arguments to function %qs",
 		 IDENTIFIER_POINTER (DECL_NAME (fndecl)));
 	  return error_mark_node;
 	}
       else if (TREE_CHAIN (arglist) != 0)
 	{
-	  error ("too many arguments to function `%s'",
+	  error ("too many arguments to function %qs",
 		 IDENTIFIER_POINTER (DECL_NAME (fndecl)));
 	  return error_mark_node;
 	}
       else
 	{
-	  error ("non-floating-point argument to function `%s'",
+	  error ("non-floating-point argument to function %qs",
 		 IDENTIFIER_POINTER (DECL_NAME (fndecl)));
 	  return error_mark_node;
 	}
@@ -8136,13 +8136,13 @@ fold_builtin_unordered_cmp (tree exp,
       /* Check that we have exactly two arguments.  */
       if (arglist == 0 || TREE_CHAIN (arglist) == 0)
 	{
-	  error ("too few arguments to function `%s'",
+	  error ("too few arguments to function %qs",
 		 IDENTIFIER_POINTER (DECL_NAME (fndecl)));
 	  return error_mark_node;
 	}
       else if (TREE_CHAIN (TREE_CHAIN (arglist)) != 0)
 	{
-	  error ("too many arguments to function `%s'",
+	  error ("too many arguments to function %qs",
 		 IDENTIFIER_POINTER (DECL_NAME (fndecl)));
 	  return error_mark_node;
 	}
@@ -8166,7 +8166,7 @@ fold_builtin_unordered_cmp (tree exp,
 	cmp_type = type1;
       else
 	{
-	  error ("non-floating-point argument to function `%s'",
+	  error ("non-floating-point argument to function %qs",
 		 IDENTIFIER_POINTER (DECL_NAME (fndecl)));
 	  return error_mark_node;
 	}
@@ -9247,7 +9247,7 @@ simplify_builtin_va_start (tree arglist)
   tree chain = TREE_CHAIN (arglist);
 
   if (TREE_CHAIN (chain))
-    error ("too many arguments to function `va_start'");
+    error ("too many arguments to function %<va_start%>");
 
   simplify_builtin_next_arg (chain);
 }
@@ -9260,7 +9260,7 @@ simplify_builtin_next_arg (tree arglist)
   if (TYPE_ARG_TYPES (fntype) == 0
       || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
 	  == void_type_node))
-    error ("`va_start' used in function with fixed args");
+    error ("%<va_start%> used in function with fixed args");
   else if (arglist)
     {
       tree last_parm = tree_last (DECL_ARGUMENTS (current_function_decl));
@@ -9276,13 +9276,13 @@ simplify_builtin_next_arg (tree arglist)
 	     || TREE_CODE (arg) == INDIRECT_REF)
 	arg = TREE_OPERAND (arg, 0);
       if (arg != last_parm)
-	warning ("second parameter of `va_start' not last named argument");
+	warning ("second parameter of %<va_start%> not last named argument");
       TREE_VALUE (arglist) = arg;
     }
   else
     /* Evidently an out of date version of <stdarg.h>; can't validate
        va_start's second argument, but can still work as intended.  */
-    warning ("`__builtin_next_arg' called without an argument");
+    warning ("%<__builtin_next_arg%> called without an argument");
 }
 
 
diff -rupN GCC.orig/gcc/c-format.c GCC/gcc/c-format.c
--- GCC.orig/gcc/c-format.c	2004-09-07 10:26:24.000000000 +0000
+++ GCC/gcc/c-format.c	2004-09-15 11:54:06.000000000 +0000
@@ -342,13 +342,13 @@ static const format_length_info strfmon_
 
 static const format_flag_spec printf_flag_specs[] =
 {
-  { ' ',  0, 0, N_("` ' flag"),        N_("the ` ' printf flag"),              STD_C89 },
-  { '+',  0, 0, N_("`+' flag"),        N_("the `+' printf flag"),              STD_C89 },
-  { '#',  0, 0, N_("`#' flag"),        N_("the `#' printf flag"),              STD_C89 },
-  { '0',  0, 0, N_("`0' flag"),        N_("the `0' printf flag"),              STD_C89 },
-  { '-',  0, 0, N_("`-' flag"),        N_("the `-' printf flag"),              STD_C89 },
-  { '\'', 0, 0, N_("`'' flag"),        N_("the `'' printf flag"),              STD_EXT },
-  { 'I',  0, 0, N_("`I' flag"),        N_("the `I' printf flag"),              STD_EXT },
+  { ' ',  0, 0, N_("' ' flag"),        N_("the ' ' printf flag"),              STD_C89 },
+  { '+',  0, 0, N_("'+' flag"),        N_("the '+' printf flag"),              STD_C89 },
+  { '#',  0, 0, N_("'#' flag"),        N_("the '#' printf flag"),              STD_C89 },
+  { '0',  0, 0, N_("'0' flag"),        N_("the '0' printf flag"),              STD_C89 },
+  { '-',  0, 0, N_("'-' flag"),        N_("the '-' printf flag"),              STD_C89 },
+  { '\'', 0, 0, N_("''' flag"),        N_("the ''' printf flag"),              STD_EXT },
+  { 'I',  0, 0, N_("'I' flag"),        N_("the 'I' printf flag"),              STD_EXT },
   { 'w',  0, 0, N_("field width"),     N_("field width in printf format"),     STD_C89 },
   { 'p',  0, 0, N_("precision"),       N_("precision in printf format"),       STD_C89 },
   { 'L',  0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
@@ -366,11 +366,11 @@ static const format_flag_pair printf_fla
 
 static const format_flag_spec asm_fprintf_flag_specs[] =
 {
-  { ' ',  0, 0, N_("` ' flag"),        N_("the ` ' printf flag"),              STD_C89 },
-  { '+',  0, 0, N_("`+' flag"),        N_("the `+' printf flag"),              STD_C89 },
-  { '#',  0, 0, N_("`#' flag"),        N_("the `#' printf flag"),              STD_C89 },
-  { '0',  0, 0, N_("`0' flag"),        N_("the `0' printf flag"),              STD_C89 },
-  { '-',  0, 0, N_("`-' flag"),        N_("the `-' printf flag"),              STD_C89 },
+  { ' ',  0, 0, N_("' ' flag"),        N_("the ' ' printf flag"),              STD_C89 },
+  { '+',  0, 0, N_("'+' flag"),        N_("the '+' printf flag"),              STD_C89 },
+  { '#',  0, 0, N_("'#' flag"),        N_("the '#' printf flag"),              STD_C89 },
+  { '0',  0, 0, N_("'0' flag"),        N_("the '0' printf flag"),              STD_C89 },
+  { '-',  0, 0, N_("'-' flag"),        N_("the '-' printf flag"),              STD_C89 },
   { 'w',  0, 0, N_("field width"),     N_("field width in printf format"),     STD_C89 },
   { 'p',  0, 0, N_("precision"),       N_("precision in printf format"),       STD_C89 },
   { 'L',  0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
@@ -395,7 +395,7 @@ static const format_flag_pair gcc_diag_f
 
 static const format_flag_spec gcc_diag_flag_specs[] =
 {
-  { 'q',  0, 0, N_("`q' flag"),        N_("the `q' diagnostic flag"),          STD_C89 },
+  { 'q',  0, 0, N_("'q' flag"),        N_("the 'q' diagnostic flag"),          STD_C89 },
   { 'p',  0, 0, N_("precision"),       N_("precision in printf format"),       STD_C89 },
   { 'L',  0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
   { 0, 0, 0, NULL, NULL, 0 }
@@ -405,9 +405,9 @@ static const format_flag_spec gcc_diag_f
 
 static const format_flag_spec gcc_cxxdiag_flag_specs[] =
 {
-  { '+',  0, 0, N_("`+' flag"),        N_("the `+' printf flag"),              STD_C89 },
-  { '#',  0, 0, N_("`#' flag"),        N_("the `#' printf flag"),              STD_C89 },
-  { 'q',  0, 0, N_("`q' flag"),        N_("the `q' diagnostic flag"),          STD_C89 },
+  { '+',  0, 0, N_("'+' flag"),        N_("the '+' printf flag"),              STD_C89 },
+  { '#',  0, 0, N_("'#' flag"),        N_("the '#' printf flag"),              STD_C89 },
+  { 'q',  0, 0, N_("'q' flag"),        N_("the 'q' diagnostic flag"),          STD_C89 },
   { 'p',  0, 0, N_("precision"),       N_("precision in printf format"),       STD_C89 },
   { 'L',  0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
   { 0, 0, 0, NULL, NULL, 0 }
@@ -416,11 +416,11 @@ static const format_flag_spec gcc_cxxdia
 static const format_flag_spec scanf_flag_specs[] =
 {
   { '*',  0, 0, N_("assignment suppression"), N_("the assignment suppression scanf feature"), STD_C89 },
-  { 'a',  0, 0, N_("`a' flag"),               N_("the `a' scanf flag"),                       STD_EXT },
+  { 'a',  0, 0, N_("'a' flag"),               N_("the 'a' scanf flag"),                       STD_EXT },
   { 'w',  0, 0, N_("field width"),            N_("field width in scanf format"),              STD_C89 },
   { 'L',  0, 0, N_("length modifier"),        N_("length modifier in scanf format"),          STD_C89 },
-  { '\'', 0, 0, N_("`'' flag"),               N_("the `'' scanf flag"),                       STD_EXT },
-  { 'I',  0, 0, N_("`I' flag"),               N_("the `I' scanf flag"),                       STD_EXT },
+  { '\'', 0, 0, N_("''' flag"),               N_("the ''' scanf flag"),                       STD_EXT },
+  { 'I',  0, 0, N_("'I' flag"),               N_("the 'I' scanf flag"),                       STD_EXT },
   { 0, 0, 0, NULL, NULL, 0 }
 };
 
@@ -434,15 +434,15 @@ static const format_flag_pair scanf_flag
 
 static const format_flag_spec strftime_flag_specs[] =
 {
-  { '_', 0,   0, N_("`_' flag"),     N_("the `_' strftime flag"),          STD_EXT },
-  { '-', 0,   0, N_("`-' flag"),     N_("the `-' strftime flag"),          STD_EXT },
-  { '0', 0,   0, N_("`0' flag"),     N_("the `0' strftime flag"),          STD_EXT },
-  { '^', 0,   0, N_("`^' flag"),     N_("the `^' strftime flag"),          STD_EXT },
-  { '#', 0,   0, N_("`#' flag"),     N_("the `#' strftime flag"),          STD_EXT },
+  { '_', 0,   0, N_("'_' flag"),     N_("the '_' strftime flag"),          STD_EXT },
+  { '-', 0,   0, N_("'-' flag"),     N_("the '-' strftime flag"),          STD_EXT },
+  { '0', 0,   0, N_("'0' flag"),     N_("the '0' strftime flag"),          STD_EXT },
+  { '^', 0,   0, N_("'^' flag"),     N_("the '^' strftime flag"),          STD_EXT },
+  { '#', 0,   0, N_("'#' flag"),     N_("the '#' strftime flag"),          STD_EXT },
   { 'w', 0,   0, N_("field width"),  N_("field width in strftime format"), STD_EXT },
-  { 'E', 0,   0, N_("`E' modifier"), N_("the `E' strftime modifier"),      STD_C99 },
-  { 'O', 0,   0, N_("`O' modifier"), N_("the `O' strftime modifier"),      STD_C99 },
-  { 'O', 'o', 0, NULL,               N_("the `O' modifier"),               STD_EXT },
+  { 'E', 0,   0, N_("'E' modifier"), N_("the 'E' strftime modifier"),      STD_C99 },
+  { 'O', 0,   0, N_("'O' modifier"), N_("the 'O' strftime modifier"),      STD_C99 },
+  { 'O', 'o', 0, NULL,               N_("the 'O' modifier"),               STD_EXT },
   { 0, 0, 0, NULL, NULL, 0 }
 };
 
@@ -461,11 +461,11 @@ static const format_flag_pair strftime_f
 static const format_flag_spec strfmon_flag_specs[] =
 {
   { '=',  0, 1, N_("fill character"),  N_("fill character in strfmon format"),  STD_C89 },
-  { '^',  0, 0, N_("`^' flag"),        N_("the `^' strfmon flag"),              STD_C89 },
-  { '+',  0, 0, N_("`+' flag"),        N_("the `+' strfmon flag"),              STD_C89 },
-  { '(',  0, 0, N_("`(' flag"),        N_("the `(' strfmon flag"),              STD_C89 },
-  { '!',  0, 0, N_("`!' flag"),        N_("the `!' strfmon flag"),              STD_C89 },
-  { '-',  0, 0, N_("`-' flag"),        N_("the `-' strfmon flag"),              STD_C89 },
+  { '^',  0, 0, N_("'^' flag"),        N_("the '^' strfmon flag"),              STD_C89 },
+  { '+',  0, 0, N_("'+' flag"),        N_("the '+' strfmon flag"),              STD_C89 },
+  { '(',  0, 0, N_("'(' flag"),        N_("the '(' strfmon flag"),              STD_C89 },
+  { '!',  0, 0, N_("'!' flag"),        N_("the '!' strfmon flag"),              STD_C89 },
+  { '-',  0, 0, N_("'-' flag"),        N_("the '-' strfmon flag"),              STD_C89 },
   { 'w',  0, 0, N_("field width"),     N_("field width in strfmon format"),     STD_C89 },
   { '#',  0, 0, N_("left precision"),  N_("left precision in strfmon format"),  STD_C89 },
   { 'p',  0, 0, N_("right precision"), N_("right precision in strfmon format"), STD_C89 },
@@ -587,7 +587,7 @@ static const format_char_info gcc_cxxdia
   /* These will require a "tree" at runtime.  */
   { "ADEFJTV",0,STD_C89,{ T89_V,   BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN  }, "q+#",   "",   NULL },
 
-  /* These accept either an `int' or an `enum tree_code' (which is handled as an `int'.)  */
+  /* These accept either an 'int' or an 'enum tree_code' (which is handled as an 'int'.)  */
   { "CLOPQ",0,STD_C89, { T89_I,   BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN  }, "q",  "",   NULL },
 
   { "<>'", 0, STD_C89, NOARGUMENTS, "",      "",   NULL },
@@ -1720,7 +1720,7 @@ check_format_info_main (format_check_res
 	      if (format_chars[1] == 's' || format_chars[1] == 'S'
 		  || format_chars[1] == '[')
 		{
-		  /* `a' is used as a flag.  */
+		  /* 'a' is used as a flag.  */
 		  i = strlen (flag_chars);
 		  flag_chars[i++] = 'a';
 		  flag_chars[i] = 0;
@@ -2137,7 +2137,7 @@ check_format_types (format_wanted_type *
       /* Check the type of the "real" argument, if there's a type we want.  */
       if (wanted_type == cur_type)
 	continue;
-      /* If we want `void *', allow any pointer type.
+      /* If we want 'void *', allow any pointer type.
 	 (Anything else would already have got a warning.)
 	 With -pedantic, only allow pointers to void and to character
 	 types.  */
@@ -2327,7 +2327,7 @@ init_dynamic_diag_info (void)
       unsigned int i;
 
       /* For the GCC-diagnostics custom format specifiers to work, one
-	 must have declared `tree' and/or `location_t' prior to using
+	 must have declared 'tree' and/or 'location_t' prior to using
 	 those attributes.  If we haven't seen these declarations then
 	 you shouldn't use the specifiers requiring these types.
 	 However we don't force a hard ICE because we may see only one
@@ -2335,7 +2335,7 @@ init_dynamic_diag_info (void)
       if ((loc = maybe_get_identifier ("location_t")))
 	loc = TREE_TYPE (identifier_global_value (loc));
 
-      /* We need to grab the underlying `union tree_node' so peek into
+      /* We need to grab the underlying 'union tree_node' so peek into
 	 an extra type level.  */
       if ((t = maybe_get_identifier ("tree")))
 	t = TREE_TYPE (TREE_TYPE (identifier_global_value (t)));
@@ -2529,7 +2529,7 @@ handle_format_attribute (tree *node, tre
       if (info.format_type == asm_fprintf_format_type)
 	init_dynamic_asm_fprintf_info();
       /* If this is one of the diagnostic attributes, then we have to
-         initialize `location_t' and `tree' at runtime.  */
+         initialize 'location_t' and 'tree' at runtime.  */
       else if (info.format_type == gcc_diag_format_type
 	       || info.format_type == gcc_cdiag_format_type
 	       || info.format_type == gcc_cxxdiag_format_type)
diff -rupN GCC.orig/gcc/c-pch.c GCC/gcc/c-pch.c
--- GCC.orig/gcc/c-pch.c	2004-09-10 10:50:19.000000000 +0000
+++ GCC/gcc/c-pch.c	2004-09-15 11:54:21.000000000 +0000
@@ -161,7 +161,7 @@ pch_init (void)
   /* The driver always provides a valid -o option.  */
   if (asm_file_name == NULL
       || strcmp (asm_file_name, "-") == 0)
-    fatal_error ("`%s' is not a valid output file", asm_file_name);
+    fatal_error ("%qs is not a valid output file", asm_file_name);
   
   asm_file_startpos = ftell (asm_out_file);
   
@@ -284,7 +284,7 @@ c_common_valid_pch (cpp_reader *pfile, c
     {
       if (cpp_get_options (pfile)->warn_invalid_pch)
 	cpp_error (pfile, CPP_DL_WARNING, 
-		   "%s: created on host `%.*s', but used on host `%s'", name,
+		   "%s: created on host '%.*s', but used on host '%s'", name,
 		   v.host_machine_length, short_strings, host_machine);
       return 2;
     }
@@ -294,7 +294,7 @@ c_common_valid_pch (cpp_reader *pfile, c
     {
       if (cpp_get_options (pfile)->warn_invalid_pch)
 	cpp_error (pfile, CPP_DL_WARNING, 
-		   "%s: created for target `%.*s', but used for target `%s'", 
+		   "%s: created for target '%.*s', but used for target '%s'", 
 		   name, v.target_machine_length, 
 		   short_strings + v.host_machine_length, target_machine);
       return 2;
@@ -307,7 +307,7 @@ c_common_valid_pch (cpp_reader *pfile, c
     {
       if (cpp_get_options (pfile)->warn_invalid_pch)
 	cpp_error (pfile, CPP_DL_WARNING,
-		   "%s: created by version `%.*s', but this is version `%s'", 
+		   "%s: created by version '%.*s', but this is version '%s'", 
 		   name, v.version_length, 
 		   (short_strings + v.host_machine_length 
 		    + v.target_machine_length), 
diff -rupN GCC.orig/gcc/coverage.c GCC/gcc/coverage.c
--- GCC.orig/gcc/coverage.c	2004-09-08 08:42:46.000000000 +0000
+++ GCC/gcc/coverage.c	2004-09-15 11:55:10.000000000 +0000
@@ -165,7 +165,7 @@ read_counts_file (void)
 
   if (!gcov_magic (gcov_read_unsigned (), GCOV_DATA_MAGIC))
     {
-      warning ("`%s' is not a gcov data file", da_file_name);
+      warning ("%qs is not a gcov data file", da_file_name);
       gcov_close ();
       return;
     }
@@ -176,7 +176,7 @@ read_counts_file (void)
       GCOV_UNSIGNED2STRING (v, tag);
       GCOV_UNSIGNED2STRING (e, GCOV_VERSION);
 
-      warning ("`%s' is version `%.*s', expected version `%.*s'",
+      warning ("%qs is version %q.*s, expected version %q.*s",
  	       da_file_name, 4, v, 4, e);
       gcov_close ();
       return;
@@ -293,7 +293,7 @@ read_counts_file (void)
       gcov_sync (offset, length);
       if ((is_error = gcov_is_error ()))
 	{
-	  error (is_error < 0 ? "`%s' has overflowed" : "`%s' is corrupted",
+	  error (is_error < 0 ? "%qs has overflowed" : "%qs is corrupted",
 		 da_file_name);
 	  htab_delete (counts_hash);
 	  break;
@@ -330,7 +330,7 @@ get_coverage_counts (unsigned counter, u
   entry = htab_find (counts_hash, &elt);
   if (!entry)
     {
-      warning ("no coverage for function '%s' found.", IDENTIFIER_POINTER
+      warning ("no coverage for function %qs found.", IDENTIFIER_POINTER
 	       (DECL_ASSEMBLER_NAME (current_function_decl)));
       return 0;
     }
@@ -338,7 +338,7 @@ get_coverage_counts (unsigned counter, u
   checksum = compute_checksum ();
   if (entry->checksum != checksum)
     {
-      error ("coverage mismatch for function '%s' while reading counter '%s'.",
+      error ("coverage mismatch for function %qs while reading counter %qs.",
 	     IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl)),
 	     ctr_names[counter]);
       error ("checksum is %x instead of %x", entry->checksum, checksum);
@@ -346,7 +346,7 @@ get_coverage_counts (unsigned counter, u
     }
   else if (entry->summary.num != expected)
     {
-      error ("coverage mismatch for function '%s' while reading counter '%s'.",
+      error ("coverage mismatch for function %qs while reading counter %qs.",
 	     IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl)),
 	     ctr_names[counter]);
       error ("number of counters is %d instead of %d", entry->summary.num, expected);
@@ -564,7 +564,7 @@ coverage_end_function (void)
 
   if (bbg_file_opened > 1 && gcov_is_error ())
     {
-      warning ("error writing `%s'", bbg_file_name);
+      warning ("error writing %qs", bbg_file_name);
       bbg_file_opened = -1;
     }
 
diff -rupN GCC.orig/gcc/except.c GCC/gcc/except.c
--- GCC.orig/gcc/except.c	2004-09-12 23:48:02.000000000 +0000
+++ GCC/gcc/except.c	2004-09-15 11:55:43.000000000 +0000
@@ -2921,7 +2921,7 @@ expand_builtin_eh_return_data_regno (tre
 
   if (TREE_CODE (which) != INTEGER_CST)
     {
-      error ("argument of `__builtin_eh_return_regno' must be constant");
+      error ("argument of %<__builtin_eh_return_regno%> must be constant");
       return constm1_rtx;
     }
 
diff -rupN GCC.orig/gcc/fold-const.c GCC/gcc/fold-const.c
--- GCC.orig/gcc/fold-const.c	2004-09-14 18:55:28.000000000 +0000
+++ GCC/gcc/fold-const.c	2004-09-15 11:57:42.000000000 +0000
@@ -4897,12 +4897,12 @@ fold_truthop (enum tree_code code, tree 
     {
       if (wanted_code == NE_EXPR)
 	{
-	  warning ("`or' of unmatched not-equal tests is always 1");
+	  warning ("%<or%> of unmatched not-equal tests is always 1");
 	  return constant_boolean_node (true, truth_type);
 	}
       else
 	{
-	  warning ("`and' of mutually exclusive equal-tests is always 0");
+	  warning ("%<and%> of mutually exclusive equal-tests is always 0");
 	  return constant_boolean_node (false, truth_type);
 	}
     }
diff -rupN GCC.orig/gcc/function.c GCC/gcc/function.c
--- GCC.orig/gcc/function.c	2004-09-10 10:50:20.000000000 +0000
+++ GCC/gcc/function.c	2004-09-15 12:09:28.000000000 +0000
@@ -831,7 +831,7 @@ assign_temp (tree type_or_decl, int keep
       if (decl && size == -1
 	  && TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST)
 	{
-	  error ("%Jsize of variable '%D' is too large", decl, decl);
+	  error ("%Jsize of variable %qD is too large", decl, decl);
 	  size = 1;
 	}
 
@@ -1432,7 +1432,7 @@ static void
 instantiate_virtual_regs_lossage (rtx insn)
 {
   gcc_assert (asm_noperands (PATTERN (insn)) >= 0);
-  error_for_asm (insn, "impossible constraint in `asm'");
+  error_for_asm (insn, "impossible constraint in %<asm%>");
   delete_insn (insn);
 }
 /* Given a pointer to a piece of rtx and an optional pointer to the
@@ -3454,7 +3454,8 @@ setjmp_vars_warning (tree block)
 	  && DECL_RTL_SET_P (decl)
 	  && REG_P (DECL_RTL (decl))
 	  && regno_clobbered_at_setjmp (REGNO (DECL_RTL (decl))))
-	warning ("%Jvariable '%D' might be clobbered by `longjmp' or `vfork'",
+	warning ("%Jvariable %qD might be clobbered by %<longjmp%>"
+		 " or %<vfork%>",
 		 decl, decl);
     }
 
@@ -3474,7 +3475,7 @@ setjmp_args_warning (void)
     if (DECL_RTL (decl) != 0
 	&& REG_P (DECL_RTL (decl))
 	&& regno_clobbered_at_setjmp (REGNO (DECL_RTL (decl))))
-      warning ("%Jargument '%D' might be clobbered by `longjmp' or `vfork'",
+      warning ("%Jargument %qD might be clobbered by %<longjmp%> or %<vfork%>",
 	       decl, decl);
 }
 
@@ -4198,7 +4199,7 @@ do_warn_unused_parameter (tree fn)
        decl; decl = TREE_CHAIN (decl))
     if (!TREE_USED (decl) && TREE_CODE (decl) == PARM_DECL
 	&& DECL_NAME (decl) && !DECL_ARTIFICIAL (decl))
-      warning ("%Junused parameter '%D'", decl, decl);
+      warning ("%Junused parameter %qD", decl, decl);
 }
 
 static GTY(()) rtx initial_trampoline;
diff -rupN GCC.orig/gcc/langhooks.c GCC/gcc/langhooks.c
--- GCC.orig/gcc/langhooks.c	2004-09-11 21:12:52.000000000 +0000
+++ GCC/gcc/langhooks.c	2004-09-15 13:51:48.000000000 +0000
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
+#include "intl.h"
 #include "tm.h"
 #include "toplev.h"
 #include "tree.h"
@@ -504,16 +505,16 @@ lhd_print_error_function (diagnostic_con
       pp_set_prefix (context->printer, new_prefix);
 
       if (current_function_decl == NULL)
-	pp_printf (context->printer, "At top level:");
+	pp_printf (context->printer, _("At top level:"));
       else
 	{
 	  if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE)
 	    pp_printf
-	      (context->printer, "In member function `%s':",
+	      (context->printer, _("In member function %qs:"),
 	       lang_hooks.decl_printable_name (current_function_decl, 2));
 	  else
 	    pp_printf
-	      (context->printer, "In function `%s':",
+	      (context->printer, _("In function %qs:"),
 	       lang_hooks.decl_printable_name (current_function_decl, 2));
 	}
 
diff -rupN GCC.orig/gcc/params.c GCC/gcc/params.c
--- GCC.orig/gcc/params.c	2004-09-10 22:54:45.000000000 +0000
+++ GCC/gcc/params.c	2004-09-15 11:59:46.000000000 +0000
@@ -73,5 +73,5 @@ set_param_value (const char *name, int v
       }
 
   /* If we didn't find this parameter, issue an error message.  */
-  error ("invalid parameter `%s'", name);
+  error ("invalid parameter %qs", name);
 }
diff -rupN GCC.orig/gcc/pretty-print.h GCC/gcc/pretty-print.h
--- GCC.orig/gcc/pretty-print.h	2004-05-13 08:47:30.000000000 +0000
+++ GCC/gcc/pretty-print.h	2004-09-15 12:22:26.000000000 +0000
@@ -248,7 +248,17 @@ extern const char *pp_base_formatted_tex
 extern const char *pp_base_last_position_in_text (const pretty_printer *);
 extern void pp_base_emit_prefix (pretty_printer *);
 extern void pp_base_append_text (pretty_printer *, const char *, const char *);
-extern void pp_printf (pretty_printer *, const char *, ...) ATTRIBUTE_PRINTF_2;
+
+/* This header may be included before toplev.h, hence the duplicate
+   definitions to allow for GCC-specific formats.  */
+#if GCC_VERSION >= 3005
+#define ATTRIBUTE_GCC_PPDIAG(m, n) __attribute__ ((__format__ (__gcc_diag__, m ,n))) ATTRIBUTE_NONNULL(m)
+#else
+#define ATTRIBUTE_GCC_PPDIAG(m, n) ATTRIBUTE_NONNULL(m)
+#endif
+extern void pp_printf (pretty_printer *, const char *, ...)
+     ATTRIBUTE_GCC_PPDIAG(2,3);
+
 extern void pp_verbatim (pretty_printer *, const char *, ...);
 extern void pp_base_flush (pretty_printer *);
 extern void pp_base_format_text (pretty_printer *, text_info *);
diff -rupN GCC.orig/gcc/reload.c GCC/gcc/reload.c
--- GCC.orig/gcc/reload.c	2004-09-10 00:20:40.000000000 +0000
+++ GCC/gcc/reload.c	2004-09-15 12:10:01.000000000 +0000
@@ -1254,7 +1254,8 @@ push_reload (rtx in, rtx out, rtx *inloc
 	mode = outmode;
       if (mode == VOIDmode)
 	{
-	  error_for_asm (this_insn, "cannot reload integer constant operand in `asm'");
+	  error_for_asm (this_insn, "cannot reload integer constant "
+			 "operand in %<asm%>");
 	  mode = word_mode;
 	  if (in != 0)
 	    inmode = word_mode;
@@ -1276,7 +1277,8 @@ push_reload (rtx in, rtx out, rtx *inloc
 	  }
       if (i == FIRST_PSEUDO_REGISTER)
 	{
-	  error_for_asm (this_insn, "impossible register constraint in `asm'");
+	  error_for_asm (this_insn, "impossible register constraint "
+			 "in %<asm%>");
 	  class = ALL_REGS;
 	}
     }
@@ -3513,7 +3515,7 @@ find_reloads (rtx insn, int replace, int
 		this_alternative_earlyclobber[i] = 0;
 		gcc_assert (this_insn_is_asm);
 		error_for_asm (this_insn,
-				"`&' constraint used with no register class");
+			       "%<&%> constraint used with no register class");
 	      }
 
 	    for (j = 0; j < noperands; j++)
@@ -3680,7 +3682,7 @@ find_reloads (rtx insn, int replace, int
       /* No alternative works with reloads??  */
       if (insn_code_number >= 0)
 	fatal_insn ("unable to generate reloads for:", insn);
-      error_for_asm (insn, "inconsistent operand constraints in an `asm'");
+      error_for_asm (insn, "inconsistent operand constraints in an %<asm%>");
       /* Avoid further trouble with this insn.  */
       PATTERN (insn) = gen_rtx_USE (VOIDmode, const0_rtx);
       n_reloads = 0;
@@ -3891,7 +3893,8 @@ find_reloads (rtx insn, int replace, int
 	else
 	  {
 	    gcc_assert (insn_code_number < 0);
-	    error_for_asm (insn, "inconsistent operand constraints in an `asm'");
+	    error_for_asm (insn, "inconsistent operand constraints "
+			   "in an %<asm%>");
 	    /* Avoid further trouble with this insn.  */
 	    PATTERN (insn) = gen_rtx_USE (VOIDmode, const0_rtx);
 	    n_reloads = 0;
diff -rupN GCC.orig/gcc/reload1.c GCC/gcc/reload1.c
--- GCC.orig/gcc/reload1.c	2004-09-10 00:20:41.000000000 +0000
+++ GCC/gcc/reload1.c	2004-09-15 12:10:41.000000000 +0000
@@ -1871,11 +1871,12 @@ spill_failure (rtx insn, enum reg_class 
 {
   static const char *const reg_class_names[] = REG_CLASS_NAMES;
   if (asm_noperands (PATTERN (insn)) >= 0)
-    error_for_asm (insn, "can't find a register in class `%s' while reloading `asm'",
+    error_for_asm (insn, "can't find a register in class %qs while "
+		   "reloading %<asm%>",
 		   reg_class_names[class]);
   else
     {
-      error ("unable to find a register to spill in class `%s'",
+      error ("unable to find a register to spill in class %qs",
 	     reg_class_names[class]);
       fatal_insn ("this is the insn:", insn);
     }
@@ -3867,7 +3868,8 @@ reload_as_needed (int live_known)
 			  || (extract_insn (p), ! constrain_operands (1))))
 		    {
 		      error_for_asm (insn,
-				     "`asm' operand requires impossible reload");
+				     "%<asm%> operand requires "
+				     "impossible reload");
 		      delete_insn (p);
 		    }
 	    }
@@ -4990,7 +4992,7 @@ failed_reload (rtx insn, int r)
   /* It's the user's fault; the operand's mode and constraint
      don't match.  Disable this reload so we don't crash in final.  */
   error_for_asm (insn,
-		 "`asm' operand constraint incompatible with operand size");
+		 "%<asm%> operand constraint incompatible with operand size");
   rld[r].in = 0;
   rld[r].out = 0;
   rld[r].reg_rtx = 0;
@@ -6609,7 +6611,7 @@ emit_output_reload_insns (struct insn_ch
       if (asm_noperands (PATTERN (insn)) < 0)
 	/* It's the compiler's fault.  */
 	fatal_insn ("VOIDmode on an output", insn);
-      error_for_asm (insn, "output operand is constant in `asm'");
+      error_for_asm (insn, "output operand is constant in %<asm%>");
       /* Prevent crash--use something we know is valid.  */
       mode = word_mode;
       old = gen_rtx_REG (mode, REGNO (reloadreg));
diff -rupN GCC.orig/gcc/stmt.c GCC/gcc/stmt.c
--- GCC.orig/gcc/stmt.c	2004-09-14 08:20:38.000000000 +0000
+++ GCC/gcc/stmt.c	2004-09-15 13:55:23.000000000 +0000
@@ -312,7 +312,7 @@ parse_output_constraint (const char **co
      message.  */
   if (!p)
     {
-      error ("output operand constraint lacks `='");
+      error ("output operand constraint lacks %<=%>");
       return false;
     }
 
@@ -327,7 +327,8 @@ parse_output_constraint (const char **co
       size_t c_len = strlen (constraint);
 
       if (p != constraint)
-	warning ("output constraint `%c' for operand %d is not at the beginning",
+	warning ("output constraint %qc for operand %d "
+		 "is not at the beginning",
 		 *p, operand_num);
 
       /* Make a copy of the constraint.  */
@@ -349,13 +350,14 @@ parse_output_constraint (const char **co
       {
       case '+':
       case '=':
-	error ("operand constraint contains incorrectly positioned '+' or '='");
+	error ("operand constraint contains incorrectly positioned "
+	       "%<+%> or %<=%>");
 	return false;
 
       case '%':
 	if (operand_num + 1 == ninputs + noutputs)
 	  {
-	    error ("`%%' constraint used with last operand");
+	    error ("%<%%%> constraint used with last operand");
 	    return false;
 	  }
 	break;
@@ -445,7 +447,7 @@ parse_input_constraint (const char **con
       case '+':  case '=':  case '&':
 	if (constraint == orig_constraint)
 	  {
-	    error ("input operand constraint contains `%c'", constraint[j]);
+	    error ("input operand constraint contains %qc", constraint[j]);
 	    return false;
 	  }
 	break;
@@ -454,7 +456,7 @@ parse_input_constraint (const char **con
 	if (constraint == orig_constraint
 	    && input_num + 1 == ninputs - ninout)
 	  {
-	    error ("`%%' constraint used with last operand");
+	    error ("%<%%%> constraint used with last operand");
 	    return false;
 	  }
 	break;
@@ -525,7 +527,7 @@ parse_input_constraint (const char **con
       default:
 	if (! ISALPHA (constraint[j]))
 	  {
-	    error ("invalid punctuation `%c' in constraint", constraint[j]);
+	    error ("invalid punctuation %qc in constraint", constraint[j]);
 	    return false;
 	  }
 	if (REG_CLASS_FROM_CONSTRAINT (constraint[j], constraint + j)
@@ -604,7 +606,8 @@ decl_conflicts_with_clobbers_p (tree dec
 	   regno++)
 	if (TEST_HARD_REG_BIT (clobbered_regs, regno))
 	  {
-	    error ("asm-specifier for variable `%s' conflicts with asm clobber list",
+	    error ("asm-specifier for variable %qs conflicts with "
+		   "asm clobber list",
 		   IDENTIFIER_POINTER (DECL_NAME (decl)));
 
 	    /* Reset registerness to stop multiple errors emitted for a
@@ -692,7 +695,7 @@ expand_asm_operands (tree string, tree o
       if (i >= 0 || i == -4)
 	++nclobbers;
       else if (i == -2)
-	error ("unknown register name `%s' in `asm'", regname);
+	error ("unknown register name %qs in %<asm%>", regname);
 
       /* Mark clobbered registers.  */
       if (i >= 0)
@@ -700,7 +703,7 @@ expand_asm_operands (tree string, tree o
 	  /* Clobbering the PIC register is an error */
 	  if (i == (int) PIC_OFFSET_TABLE_REGNUM)
 	    {
-	      error ("PIC register `%s' clobbered in `asm'", regname);
+	      error ("PIC register %qs clobbered in %<asm%>", regname);
 	      return;
 	    }
 
@@ -747,7 +750,7 @@ expand_asm_operands (tree string, tree o
   ninputs += ninout;
   if (ninputs + noutputs > MAX_RECOG_OPERANDS)
     {
-      error ("more than %d operands in `asm'", MAX_RECOG_OPERANDS);
+      error ("more than %d operands in %<asm%>", MAX_RECOG_OPERANDS);
       return;
     }
 
@@ -889,7 +892,7 @@ expand_asm_operands (tree string, tree o
 	  if (allows_reg)
 	    op = force_reg (TYPE_MODE (type), op);
 	  else if (!allows_mem)
-	    warning ("asm operand %d probably doesn't match constraints",
+	    warning ("asm operand %d probably doesn%'t match constraints",
 		     i + noutputs);
 	  else if (MEM_P (op))
 	    {
@@ -1127,7 +1130,7 @@ check_operand_nalternatives (tree output
 
       if (nalternatives + 1 > MAX_RECOG_ALTERNATIVES)
 	{
-	  error ("too many alternatives in `asm'");
+	  error ("too many alternatives in %<asm%>");
 	  return false;
 	}
 
@@ -1139,7 +1142,8 @@ check_operand_nalternatives (tree output
 
 	  if (n_occurrences (',', constraint) != nalternatives)
 	    {
-	      error ("operand constraints for `asm' differ in number of alternatives");
+	      error ("operand constraints for %<asm%> differ "
+		     "in number of alternatives");
 	      return false;
 	    }
 
@@ -1191,7 +1195,7 @@ check_unique_operand_names (tree outputs
   return true;
 
  failure:
-  error ("duplicate asm operand name '%s'",
+  error ("duplicate asm operand name %qs",
 	 TREE_STRING_POINTER (TREE_PURPOSE (TREE_PURPOSE (i))));
   return false;
 }
@@ -1317,7 +1321,7 @@ resolve_operand_name_1 (char *p, tree ou
     }
 
   *q = '\0';
-  error ("undefined named operand '%s'", p + 1);
+  error ("undefined named operand %qs", p + 1);
   op = 0;
  found:
 
diff -rupN GCC.orig/gcc/stor-layout.c GCC/gcc/stor-layout.c
--- GCC.orig/gcc/stor-layout.c	2004-09-10 00:20:42.000000000 +0000
+++ GCC/gcc/stor-layout.c	2004-09-15 12:11:47.000000000 +0000
@@ -149,7 +149,7 @@ variable_size (tree size)
   if (lang_hooks.decls.global_bindings_p ())
     {
       if (TREE_CONSTANT (size))
-	error ("type size can't be explicitly evaluated");
+	error ("type size can%'t be explicitly evaluated");
       else
 	error ("variable-size type declared outside of any function");
 
@@ -455,9 +455,9 @@ layout_decl (tree decl, unsigned int kno
 	  int size_as_int = TREE_INT_CST_LOW (size);
 
 	  if (compare_tree_int (size, size_as_int) == 0)
-	    warning ("%Jsize of '%D' is %d bytes", decl, decl, size_as_int);
+	    warning ("%Jsize of %qD is %d bytes", decl, decl, size_as_int);
 	  else
-	    warning ("%Jsize of '%D' is larger than %d bytes",
+	    warning ("%Jsize of %qD is larger than %d bytes",
                      decl, decl, larger_than_size);
 	}
     }
@@ -840,9 +840,9 @@ place_field (record_layout_info rli, tre
 	    {
 	      if (STRICT_ALIGNMENT)
 		warning ("%Jpacked attribute causes inefficient alignment "
-                         "for '%D'", field, field);
+                         "for %qD", field, field);
 	      else
-		warning ("%Jpacked attribute is unnecessary for '%D'",
+		warning ("%Jpacked attribute is unnecessary for %qD",
 			 field, field);
 	    }
 	}
@@ -858,7 +858,7 @@ place_field (record_layout_info rli, tre
 	 Bump the cumulative size to multiple of field alignment.  */
 
       if (warn_padded)
-	warning ("%Jpadding struct to align '%D'", field, field);
+	warning ("%Jpadding struct to align %qD", field, field);
 
       /* If the alignment is still within offset_align, just align
 	 the bit position.  */
@@ -1230,9 +1230,10 @@ finalize_record_size (record_layout_info
 		name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (rli->t)));
 
 	      if (STRICT_ALIGNMENT)
-		warning ("packed attribute causes inefficient alignment for `%s'", name);
+		warning ("packed attribute causes inefficient "
+			 "alignment for %qs", name);
 	      else
-		warning ("packed attribute is unnecessary for `%s'", name);
+		warning ("packed attribute is unnecessary for %qs", name);
 	    }
 	  else
 	    {
diff -rupN GCC.orig/gcc/testsuite/g++.dg/ext/member-attr.C GCC/gcc/testsuite/g++.dg/ext/member-attr.C
--- GCC.orig/gcc/testsuite/g++.dg/ext/member-attr.C	2002-01-10 15:57:24.000000000 +0000
+++ GCC/gcc/testsuite/g++.dg/ext/member-attr.C	2004-09-15 17:23:50.000000000 +0000
@@ -9,6 +9,6 @@
 
 class T {
   public:
-    __attribute__ ((garbage1)) void member1(int) {} /* { dg-error "`garbage1' attribute directive ignored" "" } */
-    void __attribute__ ((garbage2)) member2(int) {} /* { dg-error "`garbage2' attribute directive ignored" "" } */
+    __attribute__ ((garbage1)) void member1(int) {} /* { dg-error "'garbage1' attribute directive ignored" "" } */
+    void __attribute__ ((garbage2)) member2(int) {} /* { dg-error "'garbage2' attribute directive ignored" "" } */
 };
diff -rupN GCC.orig/gcc/testsuite/g++.dg/warn/deprecated.C GCC/gcc/testsuite/g++.dg/warn/deprecated.C
--- GCC.orig/gcc/testsuite/g++.dg/warn/deprecated.C	2004-03-05 14:26:28.000000000 +0000
+++ GCC/gcc/testsuite/g++.dg/warn/deprecated.C	2004-09-15 12:33:06.000000000 +0000
@@ -6,18 +6,18 @@
 typedef int INT1 __attribute__((deprecated));
 typedef INT1 INT2 __attribute__ ((__deprecated__));
 
-typedef INT1 INT1a; 			/* { dg-warning "`INT1' is deprecated" "" } */
+typedef INT1 INT1a; 			/* { dg-warning "'INT1' is deprecated" "" } */
 typedef INT1 INT1b __attribute__ ((deprecated));
 
-INT1 should_be_unavailable; 		/* { dg-warning "`INT1' is deprecated" "" } */
+INT1 should_be_unavailable; 		/* { dg-warning "'INT1' is deprecated" "" } */
 INT1a should_not_be_deprecated;
 
 INT1 f1(void) __attribute__ ((deprecated)); 
-INT1 f2(void) { return 0; }		/* { dg-warning "`INT1' is deprecated" "" } */
+INT1 f2(void) { return 0; }		/* { dg-warning "'INT1' is deprecated" "" } */
 
 INT2 f3(void) __attribute__ ((__deprecated__)); 
-INT2 f4(void) { return 0; }		/* { dg-warning "`INT2' is deprecated" "" } */
-int f5(INT2 x);				/* { dg-warning "`INT2' is deprecated" "" } */
+INT2 f4(void) { return 0; }		/* { dg-warning "'INT2' is deprecated" "" } */
+int f5(INT2 x);				/* { dg-warning "'INT2' is deprecated" "" } */
 int f6(INT2 x) __attribute__ ((__deprecated__));
 
 typedef enum Color {red, green, blue} Color __attribute__((deprecated));
@@ -25,7 +25,7 @@ typedef enum Color {red, green, blue} Co
 int g1;
 int g2 __attribute__ ((deprecated));
 int g3 __attribute__ ((__deprecated__));
-Color k;				/* { dg-warning "`Color' is deprecated" "" } */
+Color k;				/* { dg-warning "'Color' is deprecated" "" } */
 
 typedef struct {
   int field1;
@@ -46,17 +46,17 @@ typedef struct {
 
 int func1()
 {
-   INT1 w;				/* { dg-warning "`INT1' is deprecated" "" } */
+   INT1 w;				/* { dg-warning "'INT1' is deprecated" "" } */
    int x __attribute__ ((deprecated));
    int y __attribute__ ((__deprecated__));
    int z;
-   int (*pf)() = f1;			/* { dg-warning "`f1' is deprecated" "" } */
+   int (*pf)() = f1;			/* { dg-warning "'f1' is deprecated" "" } */
 
-   z = w + x + y + g1 + g2 + g3;	/* { dg-warning "`x' is deprecated" "" } */
-   					/* { dg-warning "`y' is deprecated" "" { target *-*-* } 55 } */
-   					/* { dg-warning "`g2' is deprecated" "" { target *-*-* } 55 } */
-   					/* { dg-warning "`g3' is deprecated" "" { target *-*-* } 55 } */
-   return f1(); 			/* { dg-warning "`f1' is deprecated" "" } */
+   z = w + x + y + g1 + g2 + g3;	/* { dg-warning "'x' is deprecated" "" } */
+   					/* { dg-warning "'y' is deprecated" "" { target *-*-* } 55 } */
+   					/* { dg-warning "'g2' is deprecated" "" { target *-*-* } 55 } */
+   					/* { dg-warning "'g3' is deprecated" "" { target *-*-* } 55 } */
+   return f1(); 			/* { dg-warning "'f1' is deprecated" "" } */
 }
 
 int func2(S1 *p)
@@ -64,36 +64,36 @@ int func2(S1 *p)
   S1 lp;
   
   if (p->field1)
-     return p->field2;			/* { dg-warning "`field2' is deprecated" "" } */
-  else if (lp.field4)			/* { dg-warning "`field4' is deprecated" "" } */
+     return p->field2;			/* { dg-warning "'field2' is deprecated" "" } */
+  else if (lp.field4)			/* { dg-warning "'field4' is deprecated" "" } */
      return p->field3;
   
   p->u1.field5 = g1 + p->field7;
-  p->u2.field9;				/* { dg-warning "`u2' is deprecated" "" } */
-  return p->u1.field6 + p->field8;	/* { dg-warning "`field6' is deprecated" "" } */
-  					/* { dg-warning "`field8' is deprecated" "" { target *-*-* } 73 } */
+  p->u2.field9;				/* { dg-warning "'u2' is deprecated" "" } */
+  return p->u1.field6 + p->field8;	/* { dg-warning "'field6' is deprecated" "" } */
+  					/* { dg-warning "'field8' is deprecated" "" { target *-*-* } 73 } */
 }
 
 struct SS1 {
   int x;
-  INT1 y; 				/* { dg-warning "`INT1' is deprecated" "" } */
+  INT1 y; 				/* { dg-warning "'INT1' is deprecated" "" } */
 } __attribute__ ((deprecated));
 
-struct SS1 *p1;				/* { dg-warning "`SS1' is deprecated" "" } */
+struct SS1 *p1;				/* { dg-warning "'SS1' is deprecated" "" } */
 
 struct __attribute__ ((__deprecated__)) SS2 {
   int x;
-  INT1 y; 				/* { dg-warning "`INT1' is deprecated" "" } */
+  INT1 y; 				/* { dg-warning "'INT1' is deprecated" "" } */
 };
 
-struct SS2 *p2;				/* { dg-warning "`SS2' is deprecated" "" } */
+struct SS2 *p2;				/* { dg-warning "'SS2' is deprecated" "" } */
 #endif
 
 #ifdef __cplusplus
 class T {
   public:
     void member1(int) __attribute__ ((deprecated));
-    void member2(INT1) __attribute__ ((__deprecated__)); /* { dg-warning "`INT1' is deprecated" "" } */
+    void member2(INT1) __attribute__ ((__deprecated__)); /* { dg-warning "'INT1' is deprecated" "" } */
     int member3(T *);
     int x;
 } __attribute__ ((deprecated));
@@ -104,13 +104,13 @@ inline void T::member1(int) {}
 
 int T::member3(T *p)
 {
-  p->member1(1);			/* { dg-warning "`member1' is deprecated" "" } */
-  (*p).member1(2);			/* { dg-warning "`member1' is deprecated" "" } */
-  p->member2(1);			/* { dg-warning "`member2' is deprecated" "" } */
-  (*p).member2(2);			/* { dg-warning "`member2' is deprecated" "" } */
+  p->member1(1);			/* { dg-warning "'member1' is deprecated" "" } */
+  (*p).member1(2);			/* { dg-warning "'member1' is deprecated" "" } */
+  p->member2(1);			/* { dg-warning "'member2' is deprecated" "" } */
+  (*p).member2(2);			/* { dg-warning "'member2' is deprecated" "" } */
   p->member3(p);
   (*p).member3(p);
-  return f1(); 				/* { dg-warning "`f1' is deprecated" "" } */
+  return f1(); 				/* { dg-warning "'f1' is deprecated" "" } */
 }
 #endif
 
diff -rupN GCC.orig/gcc/testsuite/gcc.dg/deprecated.c GCC/gcc/testsuite/gcc.dg/deprecated.c
--- GCC.orig/gcc/testsuite/gcc.dg/deprecated.c	2002-02-07 16:53:56.000000000 +0000
+++ GCC/gcc/testsuite/gcc.dg/deprecated.c	2004-09-15 12:31:05.000000000 +0000
@@ -6,26 +6,26 @@
 typedef int INT1 __attribute__((deprecated));
 typedef INT1 INT2 __attribute__ ((__deprecated__));
 
-typedef INT1 INT1a; 			/* { dg-warning "`INT1' is deprecated" "" } */
+typedef INT1 INT1a; 			/* { dg-warning "'INT1' is deprecated" "" } */
 typedef INT1 INT1b __attribute__ ((deprecated));
 
-INT1 should_be_unavailable; 		/* { dg-warning "`INT1' is deprecated" "" } */
+INT1 should_be_unavailable; 		/* { dg-warning "'INT1' is deprecated" "" } */
 INT1a should_not_be_deprecated;
 
 INT1 f1(void) __attribute__ ((deprecated)); 
-INT1 f2(void) { return 0; }		/* { dg-warning "`INT1' is deprecated" "" } */
+INT1 f2(void) { return 0; }		/* { dg-warning "'INT1' is deprecated" "" } */
 
 INT2 f3(void) __attribute__ ((__deprecated__)); 
-INT2 f4(void) { return 0; }		/* { dg-warning "`INT2' is deprecated" "" } */
-int f5(INT2 x);				/* { dg-warning "`INT2' is deprecated" "" } */
-int f6(INT2 x) __attribute__ ((__deprecated__)); /* { dg-warning "`INT2' is deprecated" "" } */
+INT2 f4(void) { return 0; }		/* { dg-warning "'INT2' is deprecated" "" } */
+int f5(INT2 x);				/* { dg-warning "'INT2' is deprecated" "" } */
+int f6(INT2 x) __attribute__ ((__deprecated__)); /* { dg-warning "'INT2' is deprecated" "" } */
 
 typedef enum {red, green, blue} Color __attribute__((deprecated));
 
 int g1;
 int g2 __attribute__ ((deprecated));
 int g3 __attribute__ ((__deprecated__));
-Color k;				/* { dg-warning "`Color' is deprecated" "" } */
+Color k;				/* { dg-warning "'Color' is deprecated" "" } */
 
 typedef struct {
   int field1;
@@ -46,17 +46,17 @@ typedef struct {
 
 int func1()
 {
-   INT1 w;				/* { dg-warning "`INT1' is deprecated" "" } */
+   INT1 w;				/* { dg-warning "'INT1' is deprecated" "" } */
    int x __attribute__ ((deprecated));
    int y __attribute__ ((__deprecated__));
    int z;
-   int (*pf)() = f1;			/* { dg-warning "`f1' is deprecated" "" } */
+   int (*pf)() = f1;			/* { dg-warning "'f1' is deprecated" "" } */
 
-   z = w + x + y + g1 + g2 + g3;	/* { dg-warning "`x' is deprecated" "" } */
-   					/* { dg-warning "`y' is deprecated" "" { target *-*-* } 55 } */
-   					/* { dg-warning "`g2' is deprecated" "" { target *-*-* } 55 } */
-   					/* { dg-warning "`g3' is deprecated" "" { target *-*-* } 55 } */
-   return f1(); 			/* { dg-warning "`f1' is deprecated" "" } */
+   z = w + x + y + g1 + g2 + g3;	/* { dg-warning "'x' is deprecated" "" } */
+   					/* { dg-warning "'y' is deprecated" "" { target *-*-* } 55 } */
+   					/* { dg-warning "'g2' is deprecated" "" { target *-*-* } 55 } */
+   					/* { dg-warning "'g3' is deprecated" "" { target *-*-* } 55 } */
+   return f1(); 			/* { dg-warning "'f1' is deprecated" "" } */
 }
 
 int func2(S1 *p)
@@ -64,29 +64,29 @@ int func2(S1 *p)
   S1 lp;
   
   if (p->field1)
-     return p->field2;			/* { dg-warning "`field2' is deprecated" "" } */
-  else if (lp.field4)			/* { dg-warning "`field4' is deprecated" "" } */
+     return p->field2;			/* { dg-warning "'field2' is deprecated" "" } */
+  else if (lp.field4)			/* { dg-warning "'field4' is deprecated" "" } */
      return p->field3;
   
   p->u1.field5 = g1 + p->field7;
-  p->u2.field9;				/* { dg-warning "`u2' is deprecated" "" } */
-  return p->u1.field6 + p->field8;	/* { dg-warning "`field6' is deprecated" "" } */
-  					/* { dg-warning "`field8' is deprecated" "" { target *-*-* } 73 } */
+  p->u2.field9;				/* { dg-warning "'u2' is deprecated" "" } */
+  return p->u1.field6 + p->field8;	/* { dg-warning "'field6' is deprecated" "" } */
+  					/* { dg-warning "'field8' is deprecated" "" { target *-*-* } 73 } */
 }
 
 struct SS1 {
   int x;
-  INT1 y; 				/* { dg-warning "`INT1' is deprecated" "" } */
+  INT1 y; 				/* { dg-warning "'INT1' is deprecated" "" } */
 } __attribute__ ((deprecated));
 
-struct SS1 *p1;				/* { dg-warning "`SS1' is deprecated" "" } */
+struct SS1 *p1;				/* { dg-warning "'SS1' is deprecated" "" } */
 
 struct __attribute__ ((__deprecated__)) SS2 {
   int x;
-  INT1 y; 				/* { dg-warning "`INT1' is deprecated" "" } */
+  INT1 y; 				/* { dg-warning "'INT1' is deprecated" "" } */
 };
 
-struct SS2 *p2;				/* { dg-warning "`SS2' is deprecated" "" } */
+struct SS2 *p2;				/* { dg-warning "'SS2' is deprecated" "" } */
 #endif
 
 #ifdef __cplusplus
@@ -104,13 +104,13 @@ inline void T::member1(int) {}
 
 int T::member2(T *p)
 {
-  p->member1(1);			/* { xxdg-warning "`member1' is deprecated" "" } */
-  (*p).member1(2);			/* { xxdg-warning "`member1' is deprecated" "" } */
-  p->member2(1);			/* { xxdg-warning "`member2' is deprecated" "" } */
-  (*p).member2(2);			/* { xxdg-warning "`member2' is deprecated" "" } */
+  p->member1(1);			/* { xxdg-warning "'member1' is deprecated" "" } */
+  (*p).member1(2);			/* { xxdg-warning "'member1' is deprecated" "" } */
+  p->member2(1);			/* { xxdg-warning "'member2' is deprecated" "" } */
+  (*p).member2(2);			/* { xxdg-warning "'member2' is deprecated" "" } */
   p->member3(p);
   (*p).member3(p);
-  return f1(); 				/* { xxdg-warning "`f1' is deprecated" "" } */
+  return f1(); 				/* { xxdg-warning "'f1' is deprecated" "" } */
 }
 #endif
 
diff -rupN GCC.orig/gcc/testsuite/gcc.dg/noreturn-1.c GCC/gcc/testsuite/gcc.dg/noreturn-1.c
--- GCC.orig/gcc/testsuite/gcc.dg/noreturn-1.c	2004-09-12 23:48:33.000000000 +0000
+++ GCC/gcc/testsuite/gcc.dg/noreturn-1.c	2004-09-15 12:31:13.000000000 +0000
@@ -8,7 +8,7 @@ extern void foo1(void) __attribute__ ((_
 void
 foo1(void)
 {
-} /* { dg-warning "`noreturn' function does return" "detect falling off end of noreturn" } */
+} /* { dg-warning "'noreturn' function does return" "detect falling off end of noreturn" } */
 
 extern void foo2(void) __attribute__ ((__noreturn__));
 void
@@ -26,7 +26,7 @@ foo3(void)
 extern void foo4(void);
 void
 foo4(void)
-{ /* { dg-warning "candidate for attribute `noreturn'" "detect noreturn candidate" } */
+{ /* { dg-warning "candidate for attribute 'noreturn'" "detect noreturn candidate" } */
   exit(0);
 }
 
@@ -56,4 +56,4 @@ void
 foo8(void)
 {
   foo7();
-} /* { dg-warning "`noreturn' function does return" "detect return from tail call" } */
+} /* { dg-warning "'noreturn' function does return" "detect return from tail call" } */
diff -rupN GCC.orig/gcc/testsuite/gcc.dg/noreturn-4.c GCC/gcc/testsuite/gcc.dg/noreturn-4.c
--- GCC.orig/gcc/testsuite/gcc.dg/noreturn-4.c	2004-05-13 08:47:53.000000000 +0000
+++ GCC/gcc/testsuite/gcc.dg/noreturn-4.c	2004-09-15 12:31:19.000000000 +0000
@@ -5,6 +5,6 @@ extern void exit (int) __attribute__ ((_
 
 int
 main (void)
-{ /* { dg-warning "warning: function might be possible candidate for attribute `noreturn'" "warn for main" } */
+{ /* { dg-warning "warning: function might be possible candidate for attribute 'noreturn'" "warn for main" } */
   exit (0);
 }
diff -rupN GCC.orig/gcc/toplev.c GCC/gcc/toplev.c
--- GCC.orig/gcc/toplev.c	2004-09-14 08:20:38.000000000 +0000
+++ GCC/gcc/toplev.c	2004-09-15 12:13:32.000000000 +0000
@@ -534,7 +534,7 @@ read_integral_parameter (const char *p, 
   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, in
 	      || 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, in
 	  && ! (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,
  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)
diff -rupN GCC.orig/gcc/tree-cfg.c GCC/gcc/tree-cfg.c
--- GCC.orig/gcc/tree-cfg.c	2004-09-14 08:20:38.000000000 +0000
+++ GCC/gcc/tree-cfg.c	2004-09-15 12:23:43.000000000 +0000
@@ -3273,7 +3273,7 @@ verify_stmt (tree stmt, bool last_in_blo
     {
       if (!tree_could_throw_p (stmt))
 	{
-	  error ("Statement marked for throw, but doesn't.");
+	  error ("Statement marked for throw, but doesn%'t.");
 	  goto fail;
 	}
       if (!last_in_block && tree_can_throw_internal (stmt))
@@ -3554,7 +3554,7 @@ tree_verify_flow_info (void)
 	    if (!has_label_p (true_edge->dest,
 			      GOTO_DESTINATION (COND_EXPR_THEN (stmt))))
 	      {
-		error ("`then' label does not match edge at end of bb %d\n",
+		error ("%<then%> label does not match edge at end of bb %d\n",
 		       bb->index);
 		err = 1;
 	      }
@@ -3562,7 +3562,7 @@ tree_verify_flow_info (void)
 	    if (!has_label_p (false_edge->dest,
 			      GOTO_DESTINATION (COND_EXPR_ELSE (stmt))))
 	      {
-		error ("`else' label does not match edge at end of bb %d\n",
+		error ("%<else%> label does not match edge at end of bb %d\n",
 		       bb->index);
 		err = 1;
 	      }
@@ -4841,7 +4841,8 @@ execute_warn_function_return (void)
       && !TREE_THIS_VOLATILE (cfun->decl)
       && EXIT_BLOCK_PTR->pred == NULL
       && !lang_hooks.function.missing_noreturn_ok_p (cfun->decl))
-    warning ("%Jfunction might be possible candidate for attribute `noreturn'",
+    warning ("%Jfunction might be possible candidate for "
+	     "attribute %<noreturn%>",
 	     cfun->decl);
 
   /* If we have a path to EXIT, then we do return.  */
@@ -4867,11 +4868,11 @@ execute_warn_function_return (void)
 #ifdef USE_MAPPED_LOCATION
       if (location == UNKNOWN_LOCATION)
 	location = cfun->function_end_locus;
-      warning ("%H`noreturn' function does return", &location);
+      warning ("%H%<noreturn%> function does return", &location);
 #else
       if (!locus)
 	locus = &cfun->function_end_locus;
-      warning ("%H`noreturn' function does return", locus);
+      warning ("%H%<noreturn%> function does return", locus);
 #endif
     }
 
diff -rupN GCC.orig/gcc/tree-dump.c GCC/gcc/tree-dump.c
--- GCC.orig/gcc/tree-dump.c	2004-09-10 10:50:22.000000000 +0000
+++ GCC/gcc/tree-dump.c	2004-09-15 12:24:23.000000000 +0000
@@ -842,7 +842,7 @@ dump_begin (enum tree_dump_index phase, 
   dfi = get_dump_file_info (phase);
   stream = fopen (name, dfi->state < 0 ? "w" : "a");
   if (!stream)
-    error ("could not open dump file `%s': %s", name, strerror (errno));
+    error ("could not open dump file %qs: %s", name, strerror (errno));
   else
     dfi->state = 1;
   free (name);
@@ -955,7 +955,7 @@ dump_switch_p_1 (const char *arg, struct
 	    flags |= option_ptr->value;
 	    goto found;
 	  }
-      warning ("ignoring unknown option `%.*s' in `-fdump-%s'",
+      warning ("ignoring unknown option %q.*s in %<-fdump-%s%>",
 	       length, ptr, dfi->swtch);
     found:;
       ptr = end_ptr;
diff -rupN GCC.orig/gcc/tree-mudflap.c GCC/gcc/tree-mudflap.c
--- GCC.orig/gcc/tree-mudflap.c	2004-09-10 22:54:47.000000000 +0000
+++ GCC/gcc/tree-mudflap.c	2004-09-15 12:25:16.000000000 +0000
@@ -1160,7 +1160,7 @@ mudflap_enqueue_decl (tree obj)
       for (i = 0; i < VARRAY_ACTIVE_SIZE (deferred_static_decls); i++)
         if (VARRAY_TREE (deferred_static_decls, i) == obj)
           {
-            warning ("mudflap cannot track lifetime of `%s'",
+            warning ("mudflap cannot track lifetime of %qs",
                      IDENTIFIER_POINTER (DECL_NAME (obj)));
             return;
           }
diff -rupN GCC.orig/gcc/tree.c GCC/gcc/tree.c
--- GCC.orig/gcc/tree.c	2004-09-13 20:34:24.000000000 +0000
+++ GCC/gcc/tree.c	2004-09-15 12:26:34.000000000 +0000
@@ -3072,7 +3072,7 @@ handle_dll_attribute (tree * pnode, tree
 	}
       if (TREE_CODE (node) != RECORD_TYPE && TREE_CODE (node) != UNION_TYPE)
 	{
-	  warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+	  warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
 	  *no_add_attrs = true;
 	}
 
@@ -3090,7 +3090,7 @@ handle_dll_attribute (tree * pnode, tree
       if (TREE_CODE (node) == FUNCTION_DECL  && DECL_INITIAL (node)
           && !DECL_DECLARED_INLINE_P (node))
 	{
-	  error ("%Jfunction `%D' definition is marked dllimport.", node, node);
+	  error ("%Jfunction %qD definition is marked dllimport.", node, node);
 	  *no_add_attrs = true;
 	}
 
@@ -3098,7 +3098,7 @@ handle_dll_attribute (tree * pnode, tree
 	{
 	  if (DECL_INITIAL (node))
 	    {
-	      error ("%Jvariable `%D' definition is marked dllimport.",
+	      error ("%Jvariable %qD definition is marked dllimport.",
 		     node, node);
 	      *no_add_attrs = true;
 	    }
@@ -3118,8 +3118,8 @@ handle_dll_attribute (tree * pnode, tree
       && (TREE_CODE (node) == VAR_DECL
 	  || TREE_CODE (node) == FUNCTION_DECL))
     {
-      error ("%Jexternal linkage required for symbol '%D' because of "
-	     "'%s' attribute.", node, node, IDENTIFIER_POINTER (name));
+      error ("%Jexternal linkage required for symbol %qD because of "
+	     "%qs attribute.", node, node, IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
 
@@ -5316,7 +5316,7 @@ tree_class_check_failed (const tree node
 			 int line, const char *function)
 {
   internal_error
-    ("tree check: expected class '%c', have '%c' (%s) in %s, at %s:%d",
+    ("tree check: expected class %qc, have %qc (%s) in %s, at %s:%d",
      cl, TREE_CODE_CLASS (TREE_CODE (node)),
      tree_code_name[TREE_CODE (node)], function, trim_filename (file), line);
 }
diff -rupN GCC.orig/gcc/varasm.c GCC/gcc/varasm.c
--- GCC.orig/gcc/varasm.c	2004-09-10 22:54:48.000000000 +0000
+++ GCC/gcc/varasm.c	2004-09-15 12:28:29.000000000 +0000
@@ -895,14 +895,14 @@ make_decl_rtl (tree decl)
     {
       /* First detect errors in declaring global registers.  */
       if (reg_number == -1)
-	error ("%Jregister name not specified for '%D'", decl, decl);
+	error ("%Jregister name not specified for %qD", decl, decl);
       else if (reg_number < 0)
-	error ("%Jinvalid register name for '%D'", decl, decl);
+	error ("%Jinvalid register name for %qD", decl, decl);
       else if (TYPE_MODE (TREE_TYPE (decl)) == BLKmode)
-	error ("%Jdata type of '%D' isn't suitable for a register",
+	error ("%Jdata type of %qD isn%'t suitable for a register",
 	       decl, decl);
       else if (! HARD_REGNO_MODE_OK (reg_number, TYPE_MODE (TREE_TYPE (decl))))
-	error ("%Jregister specified for '%D' isn't suitable for data type",
+	error ("%Jregister specified for %qD isn%'t suitable for data type",
                decl, decl);
       /* Now handle properly declared static register variables.  */
       else
@@ -915,7 +915,8 @@ make_decl_rtl (tree decl)
 	      error ("global register variable has initial value");
 	    }
 	  if (TREE_THIS_VOLATILE (decl))
-	    warning ("volatile register variables don't work as you might wish");
+	    warning ("volatile register variables don%'t "
+		     "work as you might wish");
 
 	  /* If the user specified one of the eliminables registers here,
 	     e.g., FRAME_POINTER_REGNUM, we don't want to get this variable
@@ -947,7 +948,7 @@ make_decl_rtl (tree decl)
      Also handle vars declared register invalidly.  */
 
   if (name[0] == '*' && (reg_number >= 0 || reg_number == -3))
-    error ("%Jregister name given for non-register variable '%D'", decl, decl);
+    error ("%Jregister name given for non-register variable %qD", decl, decl);
 
   /* Specifying a section attribute on a variable forces it into a
      non-.bss section, and thus it cannot be common.  */
@@ -1517,7 +1518,7 @@ assemble_variable (tree decl, int top_le
 
   if (!dont_output_data && DECL_SIZE (decl) == 0)
     {
-      error ("%Jstorage size of `%D' isn't known", decl, decl);
+      error ("%Jstorage size of %qD isn%'t known", decl, decl);
       TREE_ASM_WRITTEN (decl) = 1;
       return;
     }
@@ -1545,7 +1546,7 @@ assemble_variable (tree decl, int top_le
   if (! dont_output_data
       && ! host_integerp (DECL_SIZE_UNIT (decl), 1))
     {
-      error ("%Jsize of variable '%D' is too large", decl, decl);
+      error ("%Jsize of variable %qD is too large", decl, decl);
       return;
     }
 
@@ -1568,7 +1569,7 @@ assemble_variable (tree decl, int top_le
      In particular, a.out format supports a maximum alignment of 4.  */
   if (align > MAX_OFILE_ALIGNMENT)
     {
-      warning ("%Jalignment of '%D' is greater than maximum object "
+      warning ("%Jalignment of %qD is greater than maximum object "
                "file alignment.  Using %d", decl, decl,
 	       MAX_OFILE_ALIGNMENT/BITS_PER_UNIT);
       align = MAX_OFILE_ALIGNMENT;
@@ -1642,7 +1643,7 @@ assemble_variable (tree decl, int top_le
 
 #if !defined(ASM_OUTPUT_ALIGNED_COMMON) && !defined(ASM_OUTPUT_ALIGNED_DECL_COMMON) && !defined(ASM_OUTPUT_ALIGNED_BSS)
       if ((unsigned HOST_WIDE_INT) DECL_ALIGN_UNIT (decl) > rounded)
-	warning ("%Jrequested alignment for '%D' is greater than "
+	warning ("%Jrequested alignment for %qD is greater than "
                  "implemented alignment of %d", decl, decl, rounded);
 #endif
 
@@ -4009,7 +4010,7 @@ output_constructor (tree exp, unsigned H
 	  total_bytes += fieldsize;
 	}
       else if (val != 0 && TREE_CODE (val) != INTEGER_CST)
-	error ("invalid initial value for member `%s'",
+	error ("invalid initial value for member %qs",
 	       IDENTIFIER_POINTER (DECL_NAME (field)));
       else
 	{
@@ -4196,7 +4197,7 @@ merge_weak (tree newdecl, tree olddecl)
 	 declare_weak because the NEWDECL and OLDDECL was not yet
 	 been merged; therefore, TREE_ASM_WRITTEN was not set.  */
       if (TREE_ASM_WRITTEN (olddecl))
-	error ("%Jweak declaration of '%D' must precede definition",
+	error ("%Jweak declaration of %qD must precede definition",
 	       newdecl, newdecl);
 
       /* If we've already generated rtl referencing OLDDECL, we may
@@ -4204,7 +4205,7 @@ merge_weak (tree newdecl, tree olddecl)
 	 a weak symbol.  */
       else if (TREE_USED (olddecl)
 	       && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (olddecl)))
-	warning ("%Jweak declaration of '%D' after first use results "
+	warning ("%Jweak declaration of %qD after first use results "
                  "in unspecified behavior", newdecl, newdecl);
 
       if (SUPPORTS_WEAK)
@@ -4238,16 +4239,16 @@ void
 declare_weak (tree decl)
 {
   if (! TREE_PUBLIC (decl))
-    error ("%Jweak declaration of '%D' must be public", decl, decl);
+    error ("%Jweak declaration of %qD must be public", decl, decl);
   else if (TREE_CODE (decl) == FUNCTION_DECL && TREE_ASM_WRITTEN (decl))
-    error ("%Jweak declaration of '%D' must precede definition", decl, decl);
+    error ("%Jweak declaration of %qD must precede definition", decl, decl);
   else if (SUPPORTS_WEAK)
     {
       if (! DECL_WEAK (decl))
 	weak_decls = tree_cons (NULL, decl, weak_decls);
     }
   else
-    warning ("%Jweak declaration of '%D' not supported", decl, decl);
+    warning ("%Jweak declaration of %qD not supported", decl, decl);
 
   mark_weak (decl);
 }
diff -rupN GCC.orig/libmudflap/testsuite/libmudflap.c/pass35-frag.c GCC/libmudflap/testsuite/libmudflap.c/pass35-frag.c
--- GCC.orig/libmudflap/testsuite/libmudflap.c/pass35-frag.c	2004-05-13 06:41:05.000000000 +0000
+++ GCC/libmudflap/testsuite/libmudflap.c/pass35-frag.c	2004-09-15 18:47:22.000000000 +0000
@@ -3,7 +3,7 @@
 #include <string.h>
 
 extern char end [];   /* Any old symbol we're sure will be defined. */
-/* { dg-warning "cannot track lifetime of `end'" "cannot track lifetime" { target *-*-* } 0 } */
+/* { dg-warning "cannot track lifetime of 'end'" "cannot track lifetime" { target *-*-* } 0 } */
 
 int main ()
 {


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