OSDN Git Service

gcc:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Sep 2004 20:48:10 +0000 (20:48 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Sep 2004 20:48:10 +0000 (20:48 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87563 138bc75d-0d04-0410-961f-82ee72b054a4

31 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/attribs.c
gcc/builtins.c
gcc/c-format.c
gcc/c-pch.c
gcc/coverage.c
gcc/except.c
gcc/fold-const.c
gcc/function.c
gcc/langhooks.c
gcc/params.c
gcc/pretty-print.h
gcc/reload.c
gcc/reload1.c
gcc/stmt.c
gcc/stor-layout.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/member-attr.C
gcc/testsuite/g++.dg/warn/deprecated.C
gcc/testsuite/gcc.dg/deprecated.c
gcc/testsuite/gcc.dg/noreturn-1.c
gcc/testsuite/gcc.dg/noreturn-4.c
gcc/toplev.c
gcc/tree-cfg.c
gcc/tree-dump.c
gcc/tree-mudflap.c
gcc/tree.c
gcc/varasm.c
libmudflap/ChangeLog
libmudflap/testsuite/libmudflap.c/pass35-frag.c

index e3505b1..cf5b444 100644 (file)
@@ -1,3 +1,17 @@
+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.
+
 2004-09-15  Mark Mitchell  <mark@codesourcery.com>
 
        * configure.ac: Check for COMDAT support.  Robustify check for
index 68ed492..b3c83c8 100644 (file)
@@ -1577,7 +1577,7 @@ convert.o: convert.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(FLA
 
 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 \
index 6f11181..1aab101 100644 (file)
@@ -172,7 +172,7 @@ decl_attributes (tree *node, tree attributes, int flags)
 
       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 attributes, int flags)
               || (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 attributes, int flags)
            }
          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 attributes, int flags)
          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;
            }
index bf5ec08..a95f11d 100644 (file)
@@ -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 *pre_p, tree *post_p)
 
   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 *pre_p, tree *post_p)
       /* 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 fndecl, tree arglist)
   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 fndecl, tree arglist)
       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 target)
 
   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 builtin_index)
       /* 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");
 }
 
 
index 9524746..bb730f3 100644 (file)
@@ -342,13 +342,13 @@ static const format_length_info strfmon_length_specs[] =
 
 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_flag_pairs[] =
 
 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_flag_pairs[] =
 
 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_flag_specs[] =
 
 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_cxxdiag_flag_specs[] =
 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_pairs[] =
 
 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_flag_pairs[] =
 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_cxxdiag_char_table[] =
   /* 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_results *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 *types, const char *format_start,
       /* 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, tree ARG_UNUSED (name), tree args,
       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)
index 7371dba..04eee83 100644 (file)
@@ -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, const char *name, int fd)
     {
       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, const char *name, int fd)
     {
       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, const char *name, int fd)
     {
       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), 
index ac2c480..a4f4d00 100644 (file)
@@ -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, unsigned expected,
   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, unsigned expected,
   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, unsigned expected,
     }
   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;
     }
 
index 50eda2a..259a3c7 100644 (file)
@@ -2921,7 +2921,7 @@ expand_builtin_eh_return_data_regno (tree arglist)
 
   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;
     }
 
index 0dd0248..378578d 100644 (file)
@@ -4897,12 +4897,12 @@ fold_truthop (enum tree_code code, tree truth_type, tree lhs, tree rhs)
     {
       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);
        }
     }
index 29ab3e4..a7613e1 100644 (file)
@@ -831,7 +831,7 @@ assign_temp (tree type_or_decl, int keep, int memory_required,
       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;
index b1fd5b4..b52d36b 100644 (file)
@@ -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"
@@ -512,16 +513,16 @@ lhd_print_error_function (diagnostic_context *context, const char *file)
       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));
        }
 
index e109d3a..f7db800 100644 (file)
@@ -73,5 +73,5 @@ set_param_value (const char *name, int value)
       }
 
   /* If we didn't find this parameter, issue an error message.  */
-  error ("invalid parameter `%s'", name);
+  error ("invalid parameter %qs", name);
 }
index 8c568a4..42bf8e1 100644 (file)
@@ -248,7 +248,17 @@ extern const char *pp_base_formatted_text (pretty_printer *);
 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 *);
index 990cf20..f3c5978 100644 (file)
@@ -1254,7 +1254,8 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
        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, rtx *outloc,
          }
       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 ind_levels, int live_known,
                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 ind_levels, int live_known,
       /* 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 ind_levels, int live_known,
        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;
index 63f829f..8d2c2d8 100644 (file)
@@ -1871,11 +1871,12 @@ spill_failure (rtx insn, enum reg_class 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_chain *chain, struct reload *rl,
       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));
index 34ad804..2db6dfa 100644 (file)
@@ -312,7 +312,7 @@ parse_output_constraint (const char **constraint_p, int operand_num,
      message.  */
   if (!p)
     {
-      error ("output operand constraint lacks `='");
+      error ("output operand constraint lacks %<=%>");
       return false;
     }
 
@@ -327,7 +327,8 @@ parse_output_constraint (const char **constraint_p, int operand_num,
       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 **constraint_p, int operand_num,
       {
       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 **constraint_p, int input_num,
       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 **constraint_p, int input_num,
        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 **constraint_p, int input_num,
       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 decl, const HARD_REG_SET clobbered_regs)
           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 outputs, tree inputs,
       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 outputs, tree inputs,
          /* 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 outputs, tree inputs,
   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 outputs, tree inputs,
          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 outputs, tree inputs)
 
       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 outputs, tree inputs)
 
          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, tree inputs)
   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 outputs, tree inputs)
     }
 
   *q = '\0';
-  error ("undefined named operand '%s'", p + 1);
+  error ("undefined named operand %qs", p + 1);
   op = 0;
  found:
 
index 12d6d48..ccbca42 100644 (file)
@@ -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 known_align)
          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, tree field)
            {
              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, tree field)
         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 rli)
                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
            {
index 0cf8e98..e04c940 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2004-09-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
 
        PR fortran/16485
index 3ba3ee8..ede63c1 100644 (file)
@@ -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" "" } */
 };
index aa7a5b0..21b901a 100644 (file)
@@ -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} 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,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
 
index 8355747..1e07efe 100644 (file)
@@ -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
 
index 952e906..3bd6a26 100644 (file)
@@ -8,7 +8,7 @@ extern void foo1(void) __attribute__ ((__noreturn__));
 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" } */
index 6a081b3..91f6457 100644 (file)
@@ -5,6 +5,6 @@ extern void exit (int) __attribute__ ((__noreturn__));
 
 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);
 }
index 1dbe25d..848bfca 100644 (file)
@@ -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)
index cd39d4d..b8b712b 100644 (file)
@@ -3274,7 +3274,7 @@ verify_stmt (tree stmt, bool last_in_block)
     {
       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))
@@ -3555,7 +3555,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;
              }
@@ -3563,7 +3563,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;
              }
@@ -4842,7 +4842,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.  */
@@ -4868,11 +4869,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
     }
 
index 5c08132..a8818c3 100644 (file)
@@ -842,7 +842,7 @@ dump_begin (enum tree_dump_index phase, int *flag_ptr)
   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 dump_file_info *dfi)
            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;
index 18cddf8..d5e278d 100644 (file)
@@ -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;
           }
index abfd169..392d997 100644 (file)
@@ -3072,7 +3072,7 @@ handle_dll_attribute (tree * pnode, tree name, tree args, int flags,
        }
       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 name, tree args, int flags,
       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 name, tree args, int flags,
        {
          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 name, tree args, int flags,
       && (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 cl, const char *file,
                         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);
 }
index e3b53da..b5362b9 100644 (file)
@@ -897,14 +897,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
@@ -917,7 +917,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
@@ -949,7 +950,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.  */
@@ -1519,7 +1520,7 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
 
   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;
     }
@@ -1547,7 +1548,7 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
   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;
     }
 
@@ -1570,7 +1571,7 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
      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;
@@ -1644,7 +1645,7 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
 
 #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
 
@@ -4011,7 +4012,7 @@ output_constructor (tree exp, unsigned HOST_WIDE_INT size,
          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
        {
@@ -4198,7 +4199,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
@@ -4206,7 +4207,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)
@@ -4240,16 +4241,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);
 }
index 2a3e166..984e22b 100644 (file)
@@ -1,3 +1,7 @@
+2004-09-15  Joseph S. Myers  <jsm@polyomino.org.uk>
+
+       * testsuite/libmudflap.c/pass35-frag.c: Update expected message.
+
 2004-09-07  Frank Ch. Eigler  <fche@redhat.com>
 
        * configure.ac: Look for pwd.h, grp.h, netdb.h headers and functions.
index 4744ecd..dbd9737 100644 (file)
@@ -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 ()
 {