]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
builtins.c, [...]: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 9 Nov 2004 10:13:30 +0000 (10:13 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Tue, 9 Nov 2004 10:13:30 +0000 (10:13 +0000)
* builtins.c, c-common.c, c-decl.c, c-format.c, c-format.h,
c-parse.in, c-pch.c, c-pragma.c, collect2.c, final.c, gcc.c,
gcov.c, opts.c, pretty-print.h, protoize.c, reg-stack.c, rtl.c,
tlink.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
config/avr/avr.c, config/c4x/c4x.c, config/darwin.c,
config/frv/frv.c, config/h8300/h8300.c, config/i386/i386.c,
config/i386/winnt.c, config/ia64/ia64.c, config/ip2k/ip2k.c,
config/iq2000/iq2000.c, config/m32r/m32r.c,
config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/m68k/m68k.h,
config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c,
config/ns32k/ns32k.c, config/rs6000/host-darwin.c,
config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c,
config/sh/symbian.c, config/stormy16/stormy16.c,
config/v850/v850.c: Avoid "`" as left quote, using "'" or %q, %<
and %> as appropriate.  Use %' as apostrophe in diagnostics where
applicable.  Use %< and %> in place of '' quotes where applicable.
Use %qs in place of %<%s%>.  Consistently quote __builtin function
names.

ada:
* misc.c (gnat_handle_option): Use %< and %> for quoting in
warning message.

cp:
* call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
quoting in diagnostics.
* parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
quoting in printf format.
* decl.c (duplicate_decls, start_decl): Use %qD instead of
unquoted %D.

objc:
* objc-act.c: Use %q, %< and %> for quoting in diagnostics.

testsuite:
* gcc.dg/builtin-prefetch-1.c: Adjust expected messages.

From-SVN: r90337

65 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/misc.c
gcc/builtins.c
gcc/c-common.c
gcc/c-decl.c
gcc/c-format.c
gcc/c-format.h
gcc/c-parse.in
gcc/c-pch.c
gcc/c-pragma.c
gcc/collect2.c
gcc/config/alpha/alpha.c
gcc/config/arc/arc.c
gcc/config/arm/arm.c
gcc/config/avr/avr.c
gcc/config/c4x/c4x.c
gcc/config/darwin.c
gcc/config/frv/frv.c
gcc/config/h8300/h8300.c
gcc/config/i386/i386.c
gcc/config/i386/winnt.c
gcc/config/ia64/ia64.c
gcc/config/ip2k/ip2k.c
gcc/config/iq2000/iq2000.c
gcc/config/m32r/m32r.c
gcc/config/m68hc11/m68hc11.c
gcc/config/m68k/m68k.c
gcc/config/m68k/m68k.h
gcc/config/mcore/mcore.c
gcc/config/mips/mips.c
gcc/config/mmix/mmix.c
gcc/config/ns32k/ns32k.c
gcc/config/rs6000/host-darwin.c
gcc/config/rs6000/rs6000.c
gcc/config/s390/s390.c
gcc/config/sh/sh.c
gcc/config/sh/symbian.c
gcc/config/stormy16/stormy16.c
gcc/config/v850/v850.c
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/class.c
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/error.c
gcc/cp/mangle.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/search.c
gcc/cp/semantics.c
gcc/cp/typeck.c
gcc/final.c
gcc/gcc.c
gcc/gcov.c
gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/opts.c
gcc/pretty-print.h
gcc/protoize.c
gcc/reg-stack.c
gcc/rtl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtin-prefetch-1.c
gcc/tlink.c

index 7a87c1c15c05e7e456bee56f57c2b151b5d87993..2fbd2a29525dca230291fdbd2153ae702c51f7c7 100644 (file)
@@ -1,3 +1,24 @@
+2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
+
+       * builtins.c, c-common.c, c-decl.c, c-format.c, c-format.h,
+       c-parse.in, c-pch.c, c-pragma.c, collect2.c, final.c, gcc.c,
+       gcov.c, opts.c, pretty-print.h, protoize.c, reg-stack.c, rtl.c,
+       tlink.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
+       config/avr/avr.c, config/c4x/c4x.c, config/darwin.c,
+       config/frv/frv.c, config/h8300/h8300.c, config/i386/i386.c,
+       config/i386/winnt.c, config/ia64/ia64.c, config/ip2k/ip2k.c,
+       config/iq2000/iq2000.c, config/m32r/m32r.c,
+       config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/m68k/m68k.h,
+       config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c,
+       config/ns32k/ns32k.c, config/rs6000/host-darwin.c,
+       config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c,
+       config/sh/symbian.c, config/stormy16/stormy16.c,
+       config/v850/v850.c: Avoid "`" as left quote, using "'" or %q, %<
+       and %> as appropriate.  Use %' as apostrophe in diagnostics where
+       applicable.  Use %< and %> in place of '' quotes where applicable.
+       Use %qs in place of %<%s%>.  Consistently quote __builtin function
+       names.
+
 2004-11-09  Hans-Peter Nilsson  <hp@bitrange.com>
 
        * gdbinit.in (pbb, pbm): New macros.
index 2612f478718086ea8f7980efc4ae3c093af3a147..a4f166de22bc53cf701f237505b23f28bbc33cac 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
+
+       * misc.c (gnat_handle_option): Use %< and %> for quoting in
+       warning message.
+
 2004-11-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
 
        * a-numaux-x86.adb (Tan): Fix fdivp syntax.
index f74626ad4ed109c27daa1e21a6ee8cd3a62aaaea..7f77df3e3a8f75e995a1fa19b35bf8006b94e192 100644 (file)
@@ -296,7 +296,7 @@ gnat_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED)
       break;
 
     case OPT_gant:
-      warning ("`-gnat' misspelled as `-gant'");
+      warning ("%<-gnat%> misspelled as %<-gant%>");
 
       /* ... fall through ... */
 
index 3749e0ef0113809862b91bf3c933f8c49d047438..0d60c4dfa1ba7c9244ad560f841bae88f5b4957d 100644 (file)
@@ -929,7 +929,7 @@ expand_builtin_prefetch (tree arglist)
   /* Argument 1 must be either zero or one.  */
   if (INTVAL (op1) != 0 && INTVAL (op1) != 1)
     {
-      warning ("invalid second arg to __builtin_prefetch; using zero");
+      warning ("invalid second arg to %<__builtin_prefetch%>; using zero");
       op1 = const0_rtx;
     }
 
@@ -943,7 +943,7 @@ expand_builtin_prefetch (tree arglist)
   /* Argument 2 must be 0, 1, 2, or 3.  */
   if (INTVAL (op2) < 0 || INTVAL (op2) > 3)
     {
-      warning ("invalid third arg to __builtin_prefetch; using zero");
+      warning ("invalid third arg to %<__builtin_prefetch%>; using zero");
       op2 = const0_rtx;
     }
 
@@ -5486,7 +5486,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
 
          if (value != const1_rtx)
            {
-             error ("__builtin_longjmp second argument must be 1");
+             error ("%<__builtin_longjmp%> second argument must be 1");
              return const0_rtx;
            }
 
index 08d895e36bb4e4ac125e0c535c6e05c1ce488851..4a3944c071294f6a532279085cdc6bea86a6841f 100644 (file)
@@ -4311,7 +4311,7 @@ handle_mode_attribute (tree *node, tree name, tree args,
 
       if (mode == VOIDmode)
        {
-         error ("unknown machine mode %<%s%>", p);
+         error ("unknown machine mode %qs", p);
          return NULL_TREE;
        }
 
@@ -4342,7 +4342,7 @@ handle_mode_attribute (tree *node, tree name, tree args,
        }
       if (!valid_mode)
        {
-         error ("unable to emulate %<%s%>", p);
+         error ("unable to emulate %qs", p);
          return NULL_TREE;
        }
 
@@ -4352,7 +4352,7 @@ handle_mode_attribute (tree *node, tree name, tree args,
 
          if (!targetm.valid_pointer_mode (mode))
            {
-             error ("invalid pointer mode %<%s%>", p);
+             error ("invalid pointer mode %qs", p);
              return NULL_TREE;
            }
 
index 12f89aaacc1933d7e6b8f7e855086c2942bbc9fd..d30b24a06bdbdd237e7d864eb7e8df64245e99cd 100644 (file)
@@ -1005,14 +1005,14 @@ diagnose_arglist_conflict (tree newdecl, tree olddecl,
       if (TREE_CHAIN (t) == 0
          && TYPE_MAIN_VARIANT (type) != void_type_node)
        {
-         inform ("a parameter list with an ellipsis can't match "
+         inform ("a parameter list with an ellipsis can%'t match "
                  "an empty parameter name list declaration");
          break;
        }
 
       if (c_type_promotes_to (type) != type)
        {
-         inform ("an argument type that has a default promotion can't match "
+         inform ("an argument type that has a default promotion can%'t match "
                  "an empty parameter name list declaration");
          break;
        }
@@ -5063,7 +5063,7 @@ grokfield (struct c_declarator *declarator, struct c_declspecs *declspecs,
          return NULL_TREE;
        }
       if (pedantic)
-       pedwarn ("ISO C doesn't support unnamed structs/unions");
+       pedwarn ("ISO C doesn%'t support unnamed structs/unions");
     }
 
   value = grokdeclarator (declarator, declspecs, FIELD, false,
index e5009a32fea2584b4675e90f3ab25e9bebab6f9c..8faeb173c2a9b9b294b5a173dc163f210e043479 100644 (file)
@@ -212,7 +212,7 @@ decode_format_attr (tree args, function_format_info *info, int validated_p)
 
   if (!get_constant (first_arg_num_expr, &info->first_arg_num, validated_p))
     {
-      error ("'...' has invalid operand number");
+      error ("%<...%> has invalid operand number");
       return false;
     }
 
@@ -2496,7 +2496,7 @@ handle_format_attribute (tree *node, tree ARG_UNUSED (name), tree args,
          if (arg_num != info.first_arg_num)
            {
              if (!(flags & (int) ATTR_FLAG_BUILT_IN))
-               error ("args to be formatted is not '...'");
+               error ("args to be formatted is not %<...%>");
              *no_add_attrs = true;
              return NULL_TREE;
            }
index a1861b544771c8934c9a933bd5ee5c0a5ed73f8c..9ce610391feea3d289883f999015821f1554aa68 100644 (file)
@@ -161,7 +161,7 @@ typedef struct
      nonzero character that may be found in flags2 if it describes the
      flag when used with certain formats only.  If the latter, only
      the first such entry found that applies to the current conversion
-     specifier is used; the values of `name' and `long_name' it supplies
+     specifier is used; the values of 'name' and 'long_name' it supplies
      will be used, if non-NULL and the standard version is higher than
      the unpredicated one, for any pedantic warning.  For example, 'o'
      for strftime formats (meaning 'O' is an extension over C99).  */
@@ -170,10 +170,10 @@ typedef struct
      be skipped ('=' in strfmon), zero otherwise.  */
   int skip_next_char;
   /* The name to use for this flag in diagnostic messages.  For example,
-     N_("`0' flag"), N_("field width").  */
+     N_("'0' flag"), N_("field width").  */
   const char *name;
   /* Long name for this flag in diagnostic messages; currently only used for
-     "ISO C does not support ...".  For example, N_("the `I' printf flag").  */
+     "ISO C does not support ...".  For example, N_("the 'I' printf flag").  */
   const char *long_name;
   /* The standard version in which it appeared.  */
   enum format_std_version std;
index 1affab4e7b8f29d138bbc6fcf9055aef21a432b9..86880ac61537121eebc6a685360f0a38edb290c0 100644 (file)
@@ -733,7 +733,7 @@ primary:
                   c = fold ($3.value);
                   STRIP_NOPS (c);
                   if (TREE_CODE (c) != INTEGER_CST)
-                    error ("first argument to __builtin_choose_expr not"
+                    error ("first argument to %<__builtin_choose_expr%> not"
                           " a constant");
                   $$ = integer_zerop (c) ? $7 : $5;
                }
index 8b2123580874b50780fa7534f20e413bd5e1d212..5c71ad107b319918a3654aafe29984826e6db999 100644 (file)
@@ -127,7 +127,7 @@ pch_init (void)
   
   f = fopen (pch_file, "w+b");
   if (f == NULL)
-    fatal_error ("can't create precompiled header %s: %m", pch_file);
+    fatal_error ("can%'t create precompiled header %s: %m", pch_file);
   pch_outfile = f;
 
   gcc_assert (strlen (host_machine) < 256
@@ -155,7 +155,7 @@ pch_init (void)
       || fwrite (target_machine, v.target_machine_length, 1, f) != 1
       || fwrite (version_string, v.version_length, 1, f) != 1
       || fwrite (target_validity, v.target_data_length, 1, f) != 1)
-    fatal_error ("can't write to %s: %m", pch_file);
+    fatal_error ("can%'t write to %s: %m", pch_file);
 
   /* We need to be able to re-read the output.  */
   /* The driver always provides a valid -o option.  */
@@ -190,12 +190,12 @@ c_common_write_pch (void)
   h.asm_size = asm_file_end - asm_file_startpos;
   
   if (fwrite (&h, sizeof (h), 1, pch_outfile) != 1)
-    fatal_error ("can't write %s: %m", pch_file);
+    fatal_error ("can%'t write %s: %m", pch_file);
   
   buf = xmalloc (16384);
 
   if (fseek (asm_out_file, asm_file_startpos, SEEK_SET) != 0)
-    fatal_error ("can't seek in %s: %m", asm_file_name);
+    fatal_error ("can%'t seek in %s: %m", asm_file_name);
 
   for (written = asm_file_startpos; written < asm_file_end; )
     {
@@ -203,23 +203,23 @@ c_common_write_pch (void)
       if (size > 16384)
        size = 16384;
       if (fread (buf, size, 1, asm_out_file) != 1)
-       fatal_error ("can't read %s: %m", asm_file_name);
+       fatal_error ("can%'t read %s: %m", asm_file_name);
       if (fwrite (buf, size, 1, pch_outfile) != 1)
-       fatal_error ("can't write %s: %m", pch_file);
+       fatal_error ("can%'t write %s: %m", pch_file);
       written += size;
     }
   free (buf);
   /* asm_out_file can be written afterwards, so fseek to clear
      _IOREAD flag.  */
   if (fseek (asm_out_file, 0, SEEK_END) != 0)
-    fatal_error ("can't seek in %s: %m", asm_file_name);
+    fatal_error ("can%'t seek in %s: %m", asm_file_name);
 
   gt_pch_save (pch_outfile);
   cpp_write_pch_state (parse_in, pch_outfile);
 
   if (fseek (pch_outfile, 0, SEEK_SET) != 0
       || fwrite (get_ident (), IDENT_LENGTH, 1, pch_outfile) != 1)
-    fatal_error ("can't write %s: %m", pch_file);
+    fatal_error ("can%'t write %s: %m", pch_file);
 
   fclose (pch_outfile);
 }
@@ -245,7 +245,7 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd)
 
   sizeread = read (fd, ident, IDENT_LENGTH);
   if (sizeread == -1)
-    fatal_error ("can't read %s: %m", name);
+    fatal_error ("can%'t read %s: %m", name);
   else if (sizeread != IDENT_LENGTH)
     return 2;
   
@@ -273,12 +273,12 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd)
   /* At this point, we know it's a PCH file, so it ought to be long enough
      that we can read a c_pch_validity structure.  */
   if (read (fd, &v, sizeof (v)) != sizeof (v))
-    fatal_error ("can't read %s: %m", name);
+    fatal_error ("can%'t read %s: %m", name);
 
   strings_length = (v.host_machine_length + v.target_machine_length 
                    + v.version_length);
   if (read (fd, short_strings, strings_length) != strings_length)
-    fatal_error ("can't read %s: %m", name);
+    fatal_error ("can%'t read %s: %m", name);
   if (v.host_machine_length != strlen (host_machine)
       || memcmp (host_machine, short_strings, strlen (host_machine)) != 0)
     {
@@ -362,7 +362,7 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd)
     
     if ((size_t) read (fd, this_file_data, v.target_data_length)
        != v.target_data_length)
-      fatal_error ("can't read %s: %m", name);
+      fatal_error ("can%'t read %s: %m", name);
     msg = targetm.pch_valid_p (this_file_data, v.target_data_length);
     free (this_file_data);
     if (msg != NULL)
@@ -495,7 +495,7 @@ c_common_pch_pragma (cpp_reader *pfile)
   
   fd = open (name, O_RDONLY | O_BINARY, 0666);
   if (fd == -1)
-    fatal_error ("%s: couldn't open PCH file: %m\n", name);
+    fatal_error ("%s: couldn%'t open PCH file: %m\n", name);
   
   if (c_common_valid_pch (pfile, name, fd) != 1)
     {
index f59bfc07023a36ac91fea037f149e48b82f003be..24c166658b4e58797e5427725a7ccb966492597a 100644 (file)
@@ -618,7 +618,7 @@ handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED)
               visibility_options.inpragma = 1;
             }
           if (c_lex (&x) != CPP_CLOSE_PAREN)
-            GCC_BAD ("missing '(' after %<#pragma GCC visibility push%> - ignored");
+            GCC_BAD ("missing %<(%> after %<#pragma GCC visibility push%> - ignored");
         }
     }
   if (c_lex (&x) != CPP_EOF)
index a8eaf11130988d94c97b1361ea57132201a671f5..cc55cf4de00099d65e8bc973fcb998d4c7f8b006 100644 (file)
@@ -1562,7 +1562,7 @@ collect_execute (const char *prog, char **argv, const char *redir)
      since we might not end up needing something that we could not find.  */
 
   if (argv[0] == 0)
-    fatal ("cannot find `%s'", prog);
+    fatal ("cannot find '%s'", prog);
 
   if (redir)
     {
@@ -2039,7 +2039,7 @@ scan_prog_file (const char *prog_name, enum pass which_pass)
 
   /* If we do not have an `nm', complain.  */
   if (nm_file_name == 0)
-    fatal ("cannot find `nm'");
+    fatal ("cannot find 'nm'");
 
   nm_argv[argc++] = nm_file_name;
   if (NM_FLAGS[0] != '\0')
@@ -2206,7 +2206,7 @@ scan_libraries (const char *prog_name)
   /* If we do not have an `ldd', complain.  */
   if (ldd_file_name == 0)
     {
-      error ("cannot find `ldd'");
+      error ("cannot find 'ldd'");
       return;
     }
 
index 5151571116e25f27664426af158e631b853a5c70..125f01a6e41d3cd5a58cd584df2b957f3ccce8f1 100644 (file)
@@ -303,7 +303,7 @@ override_options (void)
       else if (! strcmp (alpha_tp_string, "i"))
        alpha_tp = ALPHA_TP_INSN;
       else
-       error ("bad value `%s' for -mtrap-precision switch", alpha_tp_string);
+       error ("bad value %qs for -mtrap-precision switch", alpha_tp_string);
     }
 
   if (alpha_fprm_string)
@@ -317,7 +317,7 @@ override_options (void)
       else if (! strcmp (alpha_fprm_string,"d"))
        alpha_fprm = ALPHA_FPRM_DYN;
       else
-       error ("bad value `%s' for -mfp-rounding-mode switch",
+       error ("bad value %qs for -mfp-rounding-mode switch",
               alpha_fprm_string);
     }
 
@@ -332,7 +332,7 @@ override_options (void)
       else if (strcmp (alpha_fptm_string, "sui") == 0)
        alpha_fptm = ALPHA_FPTM_SUI;
       else
-       error ("bad value `%s' for -mfp-trap-mode switch", alpha_fptm_string);
+       error ("bad value %qs for -mfp-trap-mode switch", alpha_fptm_string);
     }
 
   if (alpha_tls_size_string)
@@ -344,7 +344,7 @@ override_options (void)
       else if (strcmp (alpha_tls_size_string, "64") == 0)
        alpha_tls_size = 64;
       else
-       error ("bad value `%s' for -mtls-size switch", alpha_tls_size_string);
+       error ("bad value %qs for -mtls-size switch", alpha_tls_size_string);
     }
 
   alpha_cpu
@@ -363,7 +363,7 @@ override_options (void)
            break;
          }
       if (! cpu_table [i].name)
-       error ("bad value `%s' for -mcpu switch", alpha_cpu_string);
+       error ("bad value %qs for -mcpu switch", alpha_cpu_string);
     }
 
   if (alpha_tune_string)
@@ -375,7 +375,7 @@ override_options (void)
            break;
          }
       if (! cpu_table [i].name)
-       error ("bad value `%s' for -mcpu switch", alpha_tune_string);
+       error ("bad value %qs for -mcpu switch", alpha_tune_string);
     }
 
   /* Do some sanity checks on the above options.  */
@@ -457,7 +457,7 @@ override_options (void)
       }
     else
       {
-       warning ("bad value `%s' for -mmemory-latency", alpha_mlat_string);
+       warning ("bad value %qs for -mmemory-latency", alpha_mlat_string);
        lat = 3;
       }
 
index 9773d697f339ee313ac32c92a5afd41c9fae8330..6a334c012dab162cd32e3915c03863b441c9294f 100644 (file)
@@ -391,14 +391,14 @@ arc_handle_interrupt_attribute (tree *node ATTRIBUTE_UNUSED,
 
   if (TREE_CODE (value) != STRING_CST)
     {
-      warning ("argument of `%s' attribute is not a string constant",
+      warning ("argument of %qs attribute is not a string constant",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
   else if (strcmp (TREE_STRING_POINTER (value), "ilink1")
           && strcmp (TREE_STRING_POINTER (value), "ilink2"))
     {
-      warning ("argument of `%s' attribute is not \"ilink1\" or \"ilink2\"",
+      warning ("argument of %qs attribute is not \"ilink1\" or \"ilink2\"",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
index dab5de5020a615400e2314342d60a2e137eeaa2d..914babe02e058fe5b1cb8569870995f62ff9ec30 100644 (file)
@@ -2605,7 +2605,7 @@ arm_handle_fndecl_attribute (tree *node, tree name, tree args ATTRIBUTE_UNUSED,
 {
   if (TREE_CODE (*node) != FUNCTION_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
@@ -2623,7 +2623,7 @@ arm_handle_isr_attribute (tree *node, tree name, tree args, int flags,
     {
       if (TREE_CODE (*node) != FUNCTION_DECL)
        {
-         warning ("`%s' attribute only applies to functions",
+         warning ("%qs attribute only applies to functions",
                   IDENTIFIER_POINTER (name));
          *no_add_attrs = true;
        }
@@ -2637,7 +2637,7 @@ arm_handle_isr_attribute (tree *node, tree name, tree args, int flags,
        {
          if (arm_isr_value (args) == ARM_FT_UNKNOWN)
            {
-             warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+             warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
              *no_add_attrs = true;
            }
        }
@@ -2664,7 +2664,7 @@ arm_handle_isr_attribute (tree *node, tree name, tree args, int flags,
            }
          else
            {
-             warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+             warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
            }
        }
     }
index d080b8d1840a124b221f117f58a1960506d1fb82..573194dbce53ca766423c4b05215819ca59e950a 100644 (file)
@@ -4511,7 +4511,7 @@ avr_handle_progmem_attribute (tree *node, tree name,
        }
       else
        {
-         warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+         warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
          *no_add_attrs = true;
        }
     }
@@ -4530,7 +4530,7 @@ avr_handle_fndecl_attribute (tree *node, tree name,
 {
   if (TREE_CODE (*node) != FUNCTION_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
@@ -4612,7 +4612,7 @@ static void
 avr_file_start (void)
 {
   if (avr_asm_only_p)
-    error ("MCU `%s' supported for assembler only", avr_mcu_name);
+    error ("MCU %qs supported for assembler only", avr_mcu_name);
 
   default_file_start ();
 
index aeacecb50573156cdb0057eb3e353cc4da3a5875..22465fc18735411984484b97a7f8ba302965e000 100644 (file)
@@ -4496,7 +4496,7 @@ c4x_handle_fntype_attribute (tree *node, tree name,
 {
   if (TREE_CODE (*node) != FUNCTION_TYPE)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
index e01b383a4f211aae34dda0b6fc34b9aba75cf32f..c84a9be190e441765d82e5bf20040f3ebe497aaa 100644 (file)
@@ -1214,7 +1214,7 @@ darwin_handle_weak_import_attribute (tree *node, tree name,
 {
   if (TREE_CODE (*node) != FUNCTION_DECL)
     {
-      warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+      warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
   else
index 0347c16f1e8a12aa0d41c203b6c359a74b342407..19faaa67592fbe33b21887901757f445d7e3dcf1 100644 (file)
@@ -9613,7 +9613,7 @@ frv_int_to_acc (enum insn_code icode, int opnum, rtx opval)
 
   if (! (*insn_data[icode].operand[opnum].predicate) (reg, VOIDmode))
     {
-      error ("inappropriate accumulator for `%s'", insn_data[icode].name);
+      error ("inappropriate accumulator for %qs", insn_data[icode].name);
       return NULL_RTX;
     }
   return reg;
@@ -9702,12 +9702,12 @@ frv_check_constant_argument (enum insn_code icode, int opnum, rtx opval)
 {
   if (GET_CODE (opval) != CONST_INT)
     {
-      error ("`%s' expects a constant argument", insn_data[icode].name);
+      error ("%qs expects a constant argument", insn_data[icode].name);
       return FALSE;
     }
   if (! (*insn_data[icode].operand[opnum].predicate) (opval, VOIDmode))
     {
-      error ("constant argument out of range for `%s'", insn_data[icode].name);
+      error ("constant argument out of range for %qs", insn_data[icode].name);
       return FALSE;
     }
   return TRUE;
index 564eecdfca27dd8e05a75ec2b22b9025b1a1e069..b7810358456108154d35a65bc612d1bdfc7b9040 100644 (file)
@@ -5752,7 +5752,7 @@ h8300_handle_fndecl_attribute (tree *node, tree name,
 {
   if (TREE_CODE (*node) != FUNCTION_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
@@ -5776,7 +5776,7 @@ h8300_handle_eightbit_data_attribute (tree *node, tree name,
     }
   else
     {
-      warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+      warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
 
@@ -5799,7 +5799,7 @@ h8300_handle_tiny_data_attribute (tree *node, tree name,
     }
   else
     {
-      warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+      warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
 
index ba515867ed727891cf5eb9ea6fb82fb144cd88b1..5f45e4295e88f9cb44c049b8cc0b98204abbc1f0 100644 (file)
@@ -1271,10 +1271,10 @@ override_options (void)
        error ("bad value (%s) for -masm= switch", ix86_asm_string);
     }
   if ((TARGET_64BIT == 0) != (ix86_cmodel == CM_32))
-    error ("code model `%s' not supported in the %s bit mode",
+    error ("code model %qs not supported in the %s bit mode",
           ix86_cmodel_string, TARGET_64BIT ? "64" : "32");
   if (ix86_cmodel == CM_LARGE)
-    sorry ("code model `large' not supported yet");
+    sorry ("code model %<large%> not supported yet");
   if ((TARGET_64BIT != 0) != ((target_flags & MASK_64BIT) != 0))
     sorry ("%i-bit mode not compiled in",
           (target_flags & MASK_64BIT) ? 64 : 32);
@@ -1682,7 +1682,7 @@ ix86_handle_cdecl_attribute (tree *node, tree name,
       && TREE_CODE (*node) != FIELD_DECL
       && TREE_CODE (*node) != TYPE_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
@@ -1710,7 +1710,7 @@ ix86_handle_cdecl_attribute (tree *node, tree name,
 
   if (TARGET_64BIT)
     {
-      warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+      warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
 
@@ -1728,7 +1728,7 @@ ix86_handle_regparm_attribute (tree *node, tree name, tree args,
       && TREE_CODE (*node) != FIELD_DECL
       && TREE_CODE (*node) != TYPE_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
@@ -1739,13 +1739,13 @@ ix86_handle_regparm_attribute (tree *node, tree name, tree args,
       cst = TREE_VALUE (args);
       if (TREE_CODE (cst) != INTEGER_CST)
        {
-         warning ("`%s' attribute requires an integer constant argument",
+         warning ("%qs attribute requires an integer constant argument",
                   IDENTIFIER_POINTER (name));
          *no_add_attrs = true;
        }
       else if (compare_tree_int (cst, REGPARM_MAX) > 0)
        {
-         warning ("argument to `%s' attribute larger than %d",
+         warning ("argument to %qs attribute larger than %d",
                   IDENTIFIER_POINTER (name), REGPARM_MAX);
          *no_add_attrs = true;
        }
@@ -6538,7 +6538,7 @@ print_operand (FILE *file, rtx x, int code)
            return;
          }
        default:
-           output_operand_lossage ("invalid operand code `%c'", code);
+           output_operand_lossage ("invalid operand code '%c'", code);
        }
     }
 
@@ -14507,7 +14507,7 @@ ix86_handle_struct_attribute (tree *node, tree name,
   if (!(type && (TREE_CODE (*type) == RECORD_TYPE
                 || TREE_CODE (*type) == UNION_TYPE)))
     {
-      warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+      warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
 
@@ -14516,7 +14516,7 @@ ix86_handle_struct_attribute (tree *node, tree name,
           || ((is_attribute_p ("gcc_struct", name)
                && lookup_attribute ("ms_struct", TYPE_ATTRIBUTES (*type)))))
     {
-      warning ("`%s' incompatible attribute ignored",
+      warning ("%qs incompatible attribute ignored",
                IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
index 845960eb3e93d68ea98d0141942068554fd14f77..c8a75440f89f27543517f33b24aa309bc11af145 100644 (file)
@@ -71,7 +71,7 @@ ix86_handle_shared_attribute (tree *node, tree name,
 {
   if (TREE_CODE (*node) != VAR_DECL)
     {
-      warning ("`%s' attribute only applies to variables",
+      warning ("%qs attribute only applies to variables",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
@@ -296,7 +296,7 @@ i386_pe_mark_dllimport (tree decl)
     abort ();
   if (i386_pe_dllexport_name_p (oldname))
     {
-      error ("`%s' declared as both exported to and imported from a DLL",
+      error ("%qs declared as both exported to and imported from a DLL",
              IDENTIFIER_POINTER (DECL_NAME (decl)));
       return;
     }
index 0b65686512c0414fe226a74aed988f135079f133..a8fdec4385ff0a4a9b7a6b4d2f0135db4f0b2757 100644 (file)
@@ -477,7 +477,7 @@ ia64_handle_model_attribute (tree *node, tree name, tree args, int flags ATTRIBU
     }
   else
     {
-      warning ("invalid argument of `%s' attribute",
+      warning ("invalid argument of %qs attribute",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
@@ -509,7 +509,7 @@ ia64_handle_model_attribute (tree *node, tree name, tree args, int flags ATTRIBU
       break;
 
     default:
-      warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+      warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
       break;
     }
index 4b58fe07e30f24fd12f08abb9684f02c6007aa73..a1eddebdc4db20c55855794e0c70848502c1d87a 100644 (file)
@@ -3160,7 +3160,7 @@ ip2k_handle_progmem_attribute (tree *node, tree name,
        }
       else
        {
-         warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+         warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
          *no_add_attrs = true;
        }
     }
@@ -3178,7 +3178,7 @@ ip2k_handle_fndecl_attribute (tree *node, tree name,
 {
   if (TREE_CODE (*node) != FUNCTION_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
index 6871d0aa9561d54794dff86612580c7b9e953171..4788f9b24f4f070485be82809736dc795d7361dc 100644 (file)
@@ -2842,7 +2842,7 @@ expand_one_builtin (enum insn_code icode, rtx target, tree arglist,
       op[i] = expand_expr (arg[i], NULL_RTX, VOIDmode, 0);
       mode[i] = insn_data[icode].operand[i].mode;
       if (code[i] == CONST_INT && GET_CODE (op[i]) != CONST_INT)
-       error ("argument `%d' is not a constant", i + 1);
+       error ("argument %qd is not a constant", i + 1);
       if (code[i] == REG
          && ! (*insn_data[icode].operand[i].predicate) (op[i], mode[i]))
        op[i] = copy_to_mode_reg (mode[i], op[i]);
index b5621568997d76cdc378c2414096d2b077fc65aa..384b5ae09fd8ac160d1e11dee40daf773ebb4d29 100644 (file)
@@ -353,7 +353,7 @@ m32r_handle_model_attribute (tree *node ATTRIBUTE_UNUSED, tree name,
       && arg != large_ident1
       && arg != large_ident2)
     {
-      warning ("invalid argument of `%s' attribute",
+      warning ("invalid argument of %qs attribute",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
index 651c642d953f4a10da99afea5bc2971cd888f5ac..e134f576f62a8ba6c475499a7988a4c88eff5b11 100644 (file)
@@ -1311,7 +1311,7 @@ m68hc11_handle_page0_attribute (tree *node, tree name,
     }
   else
     {
-      warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+      warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
 
@@ -1347,7 +1347,7 @@ m68hc11_handle_fntype_attribute (tree *node, tree name,
       && TREE_CODE (*node) != FIELD_DECL
       && TREE_CODE (*node) != TYPE_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
@@ -1432,13 +1432,13 @@ m68hc11_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
   trap_handler = lookup_attribute ("trap", func_attr) != NULL_TREE;
   if (trap_handler && is_far)
     {
-      warning ("`trap' and `far' attributes are not compatible, ignoring `far'");
+      warning ("%<trap%> and %<far%> attributes are not compatible, ignoring %<far%>");
       trap_handler = 0;
     }
   if (trap_handler)
     {
       if (trap_handler_symbol != 0)
-        warning ("`trap' attribute is already used");
+        warning ("%<trap%> attribute is already used");
       else
         trap_handler_symbol = XEXP (rtl, 0);
     }
index 18b8fb415015f9b66b29b742e2002fd97a7f3d3a..1db78d93d21f7072050c518641809460ae2faf87 100644 (file)
@@ -285,7 +285,7 @@ m68k_handle_fndecl_attribute (tree *node, tree name,
 {
   if (TREE_CODE (*node) != FUNCTION_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
index a7a36f90d9d33f21933a4536e1acb5bfebf2178a..b3ededee8f87b55464ad2b8a3ca96acf61d3fee3 100644 (file)
@@ -253,9 +253,9 @@ extern int target_flags;
     { "nobitfield", - MASK_BITFIELD,                                   \
       N_("Do not use the bit-field instructions") },                   \
     { "short", MASK_SHORT,                                             \
-      N_("Consider type `int' to be 16 bits wide") },                  \
+      N_("Consider type 'int' to be 16 bits wide") },                  \
     { "noshort", - MASK_SHORT,                                         \
-      N_("Consider type `int' to be 32 bits wide") },                  \
+      N_("Consider type 'int' to be 32 bits wide") },                  \
     { "68881", MASK_68881, "" },                                       \
     { "soft-float", - MASK_68881,                                      \
       N_("Generate code with library calls for floating point") },     \
index dbd3599d60f5cd25e47d86e5509b03a239d81ded..57e5174dbc7900d5fea60e7dc79926bab8d02cdd 100644 (file)
@@ -2984,7 +2984,7 @@ mcore_override_options (void)
          || (mcore_stack_increment == 0
              && (mcore_stack_increment_string[0] != '0'
                  || mcore_stack_increment_string[1] != 0)))
-       error ("invalid option `-mstack-increment=%s'",
+       error ("invalid option %<-mstack-increment=%s%>",
               mcore_stack_increment_string);   
     }
   
@@ -3372,7 +3372,7 @@ mcore_handle_naked_attribute (tree * node, tree name, tree args ATTRIBUTE_UNUSED
     }
   else
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
index 4aa3b082a160bf8ac12d09467bd87b95c0a0c723..665e3841dc35888c09d069c446f428586c333dbf 100644 (file)
@@ -7541,7 +7541,7 @@ build_mips16_call_stub (rtx retval, rtx fn, rtx arg_size, int fp_code)
      Fortunately, this case is illegal, since it means that a function
      was declared in two different ways in a single compilation.  */
   if (fpret && ! l->fpret)
-    error ("cannot handle inconsistent calls to `%s'", fnname);
+    error ("cannot handle inconsistent calls to %qs", fnname);
 
   /* If we are calling a stub which handles a floating point return
      value, we need to arrange to save $18 in the prologue.  We do
index 98d8d60fd3809d083736c19366bafa6c5aa36f47..4f79df2814b5acea4a0fd6aa3ebfc4b38b497462 100644 (file)
@@ -1585,7 +1585,7 @@ mmix_print_operand (FILE *stream, rtx x, int code)
 
     default:
       /* Presumably there's a missing case above if we get here.  */
-      internal_error ("MMIX Internal: Missing `%c' case in mmix_print_operand", code);
+      internal_error ("MMIX Internal: Missing %qc case in mmix_print_operand", code);
     }
 
   switch (GET_CODE (modified_x))
index 696e86b818847a23e7a37a9b3cfdb355fca98ea9..d70f30898064437c15be6092ce6c3dbf7fc3973a 100644 (file)
@@ -1065,7 +1065,7 @@ ns32k_handle_fntype_attribute (tree *node, tree name,
       && TREE_CODE (*node) != FIELD_DECL
       && TREE_CODE (*node) != TYPE_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
index d04270c3675bff88f3feee61bbc9df314143ae1f..599e30603d61b1f67885d1b5788eb9903ecc76b8 100644 (file)
@@ -101,7 +101,7 @@ segv_handler (int sig ATTRIBUTE_UNUSED,
            if (strcmp (shell_commands[i][0], shell_name + 1) == 0)
              {
                fnotice (stderr, 
-                        "Try running `%s' in the shell to raise its limit.\n",
+                        "Try running '%s' in the shell to raise its limit.\n",
                         shell_commands[i][1]);
              }
        }
index abd3473e830bdb6f2b63dc27dd9ec2024ba0c81b..54c76dba30430b27653d243b172be04df0ba255a 100644 (file)
@@ -1268,7 +1268,7 @@ rs6000_override_options (const char *default_cpu)
       else if (! strncmp (rs6000_traceback_name, "no", 2))
        rs6000_traceback = traceback_none;
       else
-       error ("unknown -mtraceback arg `%s'; expecting `full', `partial' or `none'",
+       error ("unknown -mtraceback arg %qs; expecting %<full%>, %<partial%> or %<none%>",
               rs6000_traceback_name);
     }
 
@@ -1369,7 +1369,7 @@ rs6000_override_options (const char *default_cpu)
       while (base[-1] != 'm') base--;
 
       if (*rs6000_longcall_switch != '\0')
-       error ("invalid option `%s'", base);
+       error ("invalid option %qs", base);
       rs6000_default_long_calls = (base[0] != 'n');
     }
 
@@ -1380,7 +1380,7 @@ rs6000_override_options (const char *default_cpu)
       while (base[-1] != 'm') base--;
 
       if (*rs6000_warn_altivec_long_switch != '\0')
-       error ("invalid option `%s'", base);
+       error ("invalid option %qs", base);
       rs6000_warn_altivec_long = (base[0] != 'n');
     }
 
@@ -1677,7 +1677,7 @@ rs6000_parse_tls_size_option (void)
   else if (strcmp (rs6000_tls_size_string, "64") == 0)
     rs6000_tls_size = 64;
   else
-    error ("bad value `%s' for -mtls-size switch", rs6000_tls_size_string);
+    error ("bad value %qs for -mtls-size switch", rs6000_tls_size_string);
 }
 
 void
@@ -6798,7 +6798,7 @@ altivec_expand_dst_builtin (tree exp, rtx target ATTRIBUTE_UNUSED,
        if (TREE_CODE (arg2) != INTEGER_CST
            || TREE_INT_CST_LOW (arg2) & ~0x3)
          {
-           error ("argument to `%s' must be a 2-bit unsigned literal", d->name);
+           error ("argument to %qs must be a 2-bit unsigned literal", d->name);
            return const0_rtx;
          }
 
@@ -6926,7 +6926,7 @@ altivec_expand_builtin (tree exp, rtx target, bool *expandedp)
       while (TREE_CODE (arg0) == NOP_EXPR || TREE_CODE (arg0) == ADDR_EXPR
             || TREE_CODE (arg0) == ARRAY_REF)
        arg0 = TREE_OPERAND (arg0, 0);
-      error ("invalid parameter combination for `%s' AltiVec intrinsic",
+      error ("invalid parameter combination for %qs AltiVec intrinsic",
             TREE_STRING_POINTER (arg0));
 
       return const0_rtx;
@@ -16746,7 +16746,7 @@ rs6000_handle_altivec_attribute (tree *node, tree name, tree args,
   *no_add_attrs = true;  /* No need to hang on to the attribute.  */
 
   if (!result)
-    warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+    warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
   else
     *node = reconstruct_complex_type (*node, result);
 
@@ -16781,7 +16781,7 @@ rs6000_handle_longcall_attribute (tree *node, tree name,
       && TREE_CODE (*node) != FIELD_DECL
       && TREE_CODE (*node) != TYPE_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
index 8189de09d41466fd3359fe22d1bb57efc2863486..b4b4c452092a3371efc72799ead982611c1e7876 100644 (file)
@@ -6827,11 +6827,11 @@ s390_emit_prologue (void)
 
       if (s390_warn_framesize > 0 
          && cfun_frame_layout.frame_size >= s390_warn_framesize)
-       warning ("frame size of `%s' is " HOST_WIDE_INT_PRINT_DEC " bytes", 
+       warning ("frame size of %qs is " HOST_WIDE_INT_PRINT_DEC " bytes", 
                 current_function_name (), cfun_frame_layout.frame_size);
 
       if (s390_warn_dynamicstack_p && cfun->calls_alloca)
-       warning ("`%s' uses dynamic stack allocation", current_function_name ());
+       warning ("%qs uses dynamic stack allocation", current_function_name ());
 
       /* Save incoming stack pointer into temp reg.  */
       if (cfun_frame_layout.save_backchain_p || next_fpr)
index cf8bb41fafc80d054c6e1f40cb381727123fa367..699f316064e0a140a152e376a62f39c01c68558a 100644 (file)
@@ -7150,7 +7150,7 @@ sh_handle_interrupt_handler_attribute (tree *node, tree name,
 {
   if (TREE_CODE (*node) != FUNCTION_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
@@ -7171,21 +7171,21 @@ sh_handle_sp_switch_attribute (tree *node, tree name, tree args,
 {
   if (TREE_CODE (*node) != FUNCTION_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
   else if (!pragma_interrupt)
     {
       /* The sp_switch attribute only has meaning for interrupt functions.  */
-      warning ("`%s' attribute only applies to interrupt functions",
+      warning ("%qs attribute only applies to interrupt functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
   else if (TREE_CODE (TREE_VALUE (args)) != STRING_CST)
     {
       /* The argument must be a constant string.  */
-      warning ("`%s' attribute argument not a string constant",
+      warning ("%qs attribute argument not a string constant",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
@@ -7206,21 +7206,21 @@ sh_handle_trap_exit_attribute (tree *node, tree name, tree args,
 {
   if (TREE_CODE (*node) != FUNCTION_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
   else if (!pragma_interrupt)
     {
       /* The trap_exit attribute only has meaning for interrupt functions.  */
-      warning ("`%s' attribute only applies to interrupt functions",
+      warning ("%qs attribute only applies to interrupt functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
   else if (TREE_CODE (TREE_VALUE (args)) != INTEGER_CST)
     {
       /* The argument must be a constant integer.  */
-      warning ("`%s' attribute argument not an integer constant",
+      warning ("%qs attribute argument not an integer constant",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
@@ -7348,7 +7348,7 @@ sh_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");
index 02b95f5970d8a426a56aba3d1f8abe2e26cde5ff..cb04c8c8d769e3931037ee6264e00f758505edd5 100644 (file)
@@ -276,7 +276,7 @@ sh_symbian_mark_dllimport (tree decl)
 
   if (sh_symbian_dllexport_name_p (oldname))
     {
-      error ("`%s' declared as both exported to and imported from a DLL",
+      error ("%qs declared as both exported to and imported from a DLL",
              IDENTIFIER_POINTER (DECL_NAME (decl)));
     }
   else if (sh_symbian_dllimport_name_p (oldname))
@@ -411,14 +411,14 @@ sh_symbian_handle_dll_attribute (tree *pnode, tree name, tree args,
                   | (int) ATTR_FLAG_FUNCTION_NEXT
                   | (int) ATTR_FLAG_ARRAY_NEXT))
        {
-         warning ("`%s' attribute ignored", attr);
+         warning ("%qs attribute ignored", attr);
          *no_add_attrs = true;
          return tree_cons (name, args, NULL_TREE);
        }
 
       if (TREE_CODE (node) != RECORD_TYPE && TREE_CODE (node) != UNION_TYPE)
        {
-         warning ("`%s' attribute ignored", attr);
+         warning ("%qs attribute ignored", attr);
          *no_add_attrs = true;
        }
 
@@ -433,7 +433,7 @@ sh_symbian_handle_dll_attribute (tree *pnode, tree name, tree args,
        {
          if (DECL_INITIAL (node))
            {
-             error ("%Hvariable `%D' definition is marked dllimport.",
+             error ("%Hvariable %qD definition is marked dllimport.",
                     & DECL_SOURCE_LOCATION (node), node);
              *no_add_attrs = true;
            }
index 76195cad37eba252d825ea4904f27f3e824da9d8..06a2f0d3fb67e98bfdbe37361a6d0e4b9dfc1710 100644 (file)
@@ -1918,7 +1918,7 @@ xstormy16_print_operand (FILE *file, rtx x, int code)
        if (GET_CODE (x) == CONST_INT)
          xx = INTVAL (x);
        else
-         output_operand_lossage ("`B' operand is not constant");
+         output_operand_lossage ("'B' operand is not constant");
        
        /* GCC sign-extends masks with the MSB set, so we have to
           detect all the cases that differ only in sign extension
@@ -1945,7 +1945,7 @@ xstormy16_print_operand (FILE *file, rtx x, int code)
          }
 
        if (l == -1)
-         output_operand_lossage ("`B' operand has multiple bits set");
+         output_operand_lossage ("'B' operand has multiple bits set");
        
        fprintf (file, IMMEDIATE_PREFIX HOST_WIDE_INT_PRINT_DEC, l);
        return;
@@ -1971,7 +1971,7 @@ xstormy16_print_operand (FILE *file, rtx x, int code)
        if (GET_CODE (x) == CONST_INT)
          xx = INTVAL (x);
        else
-         output_operand_lossage ("`o' operand is not constant");
+         output_operand_lossage ("'o' operand is not constant");
        
        if (code == 'O')
          xx = -xx;
@@ -1989,7 +1989,7 @@ xstormy16_print_operand (FILE *file, rtx x, int code)
        if (GET_CODE (x) == CONST_INT)
          xx = INTVAL (x);
        else
-         output_operand_lossage ("`B' operand is not constant");
+         output_operand_lossage ("'B' operand is not constant");
        
        l = 7 - xx;
        
@@ -2410,7 +2410,7 @@ xstormy16_handle_interrupt_attribute (tree *node, tree name,
 {
   if (TREE_CODE (*node) != FUNCTION_TYPE)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
@@ -2431,7 +2431,7 @@ xstormy16_handle_below100_attribute (tree *node,
       && TREE_CODE (*node) != POINTER_TYPE
       && TREE_CODE (*node) != TYPE_DECL)
     {
-      warning ("`__BELOW100__' attribute only applies to variables");
+      warning ("%<__BELOW100__%> attribute only applies to variables");
       *no_add_attrs = true;
     }
   else if (args == NULL_TREE && TREE_CODE (*node) == VAR_DECL)
index 98c24c94ffed23516b7bca97ab2984d71a22e9f3..8154b6616f1b84cdf1d85cda75821bf9f98e3503 100644 (file)
@@ -2204,7 +2204,7 @@ v850_handle_interrupt_attribute (tree * node,
 {
   if (TREE_CODE (*node) != FUNCTION_DECL)
     {
-      warning ("`%s' attribute only applies to functions",
+      warning ("%qs attribute only applies to functions",
               IDENTIFIER_POINTER (name));
       *no_add_attrs = true;
     }
index f94382ed0aa45e0c15a2aec3b2a7eb0efbf17cbf..8ac1df2fd1234e172f64df4d2f30e40faf6ee147 100644 (file)
@@ -1,3 +1,13 @@
+2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
+
+       * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
+       pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
+       quoting in diagnostics.
+       * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
+       quoting in printf format.
+       * decl.c (duplicate_decls, start_decl): Use %qD instead of
+       unquoted %D.
+
 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
 
        * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
index 3c726432f8e4ddbac00fa5adb1bb343e9a567a64..613d0d4493ece92d165f56a9c98fd9ab7375cd02 100644 (file)
@@ -3400,7 +3400,7 @@ build_conditional_expr (tree arg1, tree arg2, tree arg3)
       
       if (TREE_CODE (arg2_type) == ENUMERAL_TYPE
           && TREE_CODE (arg3_type) == ENUMERAL_TYPE)
-         warning ("enumeral mismatch in conditional expression: `%T' vs `%T'",
+         warning ("enumeral mismatch in conditional expression: %qT vs %qT",
                    arg2_type, arg3_type);
       else if (extra_warnings
                && ((TREE_CODE (arg2_type) == ENUMERAL_TYPE
index 63e2cf7466696d39537c2a9e56de293f74dd2326..e146abc0223ed7042854ffe006e347a8625cb14a 100644 (file)
@@ -5529,7 +5529,7 @@ push_lang_context (tree name)
       current_lang_name = name;
     }
   else
-    error ("language string `\"%E\"' not recognized", name);
+    error ("language string %<\"%E\"%> not recognized", name);
 }
   
 /* Get out of the current language scope.  */
index b429a783e7f3c8921cb56574f4cb9bac52c9951d..a6961215396730e9ffaf7c0755d168d07426d64e 100644 (file)
@@ -1848,7 +1848,7 @@ duplicate_decls (tree newdecl, tree olddecl)
               that specialization that would cause an implicit
               instantiation to take place, in every translation unit in
               which such a use occurs.  */
-           error ("explicit specialization of %D after first use",
+           error ("explicit specialization of %qD after first use",
                      olddecl);
 
          SET_DECL_TEMPLATE_SPECIALIZATION (olddecl);
@@ -3781,7 +3781,7 @@ start_decl (const cp_declarator *declarator,
                 initialization.  Thus, duplicate_decls won't warn
                 about this situation, and so we check here.  */
              if (DECL_INITIAL (decl) && DECL_INITIAL (field))
-               error ("duplicate initialization of %D", decl);
+               error ("duplicate initialization of %qD", decl);
              if (duplicate_decls (decl, field))
                decl = field;
            }
@@ -7052,7 +7052,7 @@ grokdeclarator (const cp_declarator *declarator,
   /* Warn about storage classes that are invalid for certain
      kinds of declarations (parameters, typenames, etc.).  */
   if (declspecs->multiple_storage_classes_p)
-    error ("multiple storage classes in declaration of `%s'", name);
+    error ("multiple storage classes in declaration of %qs", name);
   else if (thread_p
           && ((storage_class
                && storage_class != sc_extern
index 310f386d48f4b7b3ebeb610b9c4709f150578b5e..03c51e779075934ad79eedb4b1f5840c7db54380 100644 (file)
@@ -961,7 +961,7 @@ grokfield (const cp_declarator *declarator,
 
     case FIELD_DECL:
       if (asmspec)
-       error ("`asm' specifiers are not permitted on non-static data members");
+       error ("%<asm%> specifiers are not permitted on non-static data members");
       if (DECL_INITIAL (value) == error_mark_node)
        init = error_mark_node;
       cp_finish_decl (value, init, NULL_TREE, flags);
@@ -3030,7 +3030,7 @@ cp_finish_file (void)
             already verified there was a definition.  */
          && !DECL_EXPLICIT_INSTANTIATION (decl))
        {
-         cp_warning_at ("inline function `%D' used but never defined", decl);
+         cp_warning_at ("inline function %qD used but never defined", decl);
          /* This symbol is effectively an "extern" declaration now.
             This is not strictly necessary, but removes a duplicate
             warning.  */
index 9c7642a533ffa04846ae288ae52183d467a5a2ff..07fa6d9ddf1cc877bc57ab6011beb87db3058606 100644 (file)
@@ -2230,7 +2230,7 @@ print_instantiation_partial_context (diagnostic_context *context,
       xloc = expand_location (loc);
       if (t == NULL_TREE)
        break;
-      pp_verbatim (context->printer, "%s:%d:   instantiated from `%s'\n",
+      pp_verbatim (context->printer, "%s:%d:   instantiated from %qs\n",
                    xloc.file, xloc.line,
                    decl_as_string (TINST_DECL (t),
                                    TFF_DECL_SPECIFIERS | TFF_RETURN_TYPE));
@@ -2370,7 +2370,7 @@ locate_error (const char *msgid, va_list ap)
 
            default:
              errorcount = 0;  /* damn ICE suppression */
-             internal_error ("unexpected letter `%c' in locate_error\n", *f);
+             internal_error ("unexpected letter %qc in locate_error\n", *f);
            }
        }
     }
index 1aeb3beb401fdf18abff85e5f369650fae011011..eb9f8f075a2f8a332ba6c9e62fcd8330e1d3e165 100644 (file)
@@ -2169,7 +2169,7 @@ write_expression (tree expr)
                 expression without extending the C++ ABI.  */
              if (code == COND_EXPR && i == 1 && !operand)
                {
-                 error ("omitted middle operand to `?:' operand "
+                 error ("omitted middle operand to %<?:%> operand "
                         "cannot be mangled");
                  continue;
                }
@@ -2479,7 +2479,7 @@ static inline const char *
 finish_mangling (const bool warn)
 {
   if (warn_abi && warn && G.need_abi_warning)
-    warning ("the mangled name of `%D' will change in a future "
+    warning ("the mangled name of %qD will change in a future "
             "version of GCC",
             G.entity);
 
index 646013ad35afe09c82ea747092bfedc28cd2c5bf..ef02ba9f514fc5c9436a23f805571c79bc914240 100644 (file)
@@ -1821,7 +1821,7 @@ cp_parser_name_lookup_error (cp_parser* parser,
        error ("%<%T::%D%> has not been declared", 
               parser->object_scope, name);
       else
-       error ("`%D' has not been declared", name);
+       error ("%qD has not been declared", name);
     }
   else if (parser->scope && parser->scope != global_namespace)
     error ("%<%D::%D%> %s", parser->scope, name, desired);
@@ -15228,7 +15228,7 @@ cp_parser_sizeof_operand (cp_parser* parser, enum rid keyword)
 
   /* Initialize FORMAT the first time we get here.  */
   if (!format)
-    format = "types may not be defined in `%s' expressions";
+    format = "types may not be defined in '%s' expressions";
 
   /* Types cannot be defined in a `sizeof' expression.  Save away the
      old message.  */
@@ -15266,7 +15266,7 @@ cp_parser_sizeof_operand (cp_parser* parser, enum rid keyword)
       type = cp_parser_type_id (parser);
       parser->in_type_id_in_expr_p = saved_in_type_id_in_expr_p;
       /* Now, look for the trailing `)'.  */
-      cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'");
+      cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>");
       /* If all went well, then we're done.  */
       if (cp_parser_parse_definitely (parser))
        {
index c35fd11fd3fe47c852ee79f5c44a4b1f9e011cd3..28ae8f375b3ca5db63f5355a53dbb81b421ae486 100644 (file)
@@ -1795,7 +1795,7 @@ check_explicit_specialization (tree declarator,
        error("too few template parameter lists in declaration of %qD", decl);
       else
        error("explicit specialization of %qD must be introduced by "
-             "`template <>'", decl);
+             "%<template <>%>", decl);
 
       /* Fall through.  */
     case tsk_expl_spec:
@@ -7407,7 +7407,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
       }
 
     default:
-      sorry ("use of `%s' in template",
+      sorry ("use of %qs in template",
             tree_code_name [(int) TREE_CODE (t)]);
       return error_mark_node;
     }
index 635beeaef979edd6db9ed810058cca049b8f03c8..a95bde3e095c234a1cf2aaf3656e11f1cd473c39 100644 (file)
@@ -1131,7 +1131,7 @@ lookup_field_r (tree binfo, void *data)
          /* Add the new value.  */
          lfi->ambiguous = tree_cons (NULL_TREE, nval, lfi->ambiguous);
          TREE_TYPE (lfi->ambiguous) = error_mark_node;
-         lfi->errstr = "request for member `%D' is ambiguous";
+         lfi->errstr = "request for member %qD is ambiguous";
        }
     }
   else
index 34b57e8ff380bbc5901cd43c2f5f7066633f9792..a36a631896ce0bd351d5571bde54da9b0fd8d004 100644 (file)
@@ -1858,15 +1858,15 @@ finish_this_expr (void)
   else if (current_function_decl
           && DECL_STATIC_FUNCTION_P (current_function_decl))
     {
-      error ("`this' is unavailable for static member functions");
+      error ("%<this%> is unavailable for static member functions");
       result = error_mark_node;
     }
   else
     {
       if (current_function_decl)
-       error ("invalid use of `this' in non-member function");
+       error ("invalid use of %<this%> in non-member function");
       else
-       error ("invalid use of `this' at top level");
+       error ("invalid use of %<this%> at top level");
       result = error_mark_node;
     }
 
@@ -2004,7 +2004,7 @@ finish_template_type_parm (tree aggr, tree identifier)
 {
   if (aggr != class_type_node)
     {
-      pedwarn ("template type parameters must use the keyword `class' or `typename'");
+      pedwarn ("template type parameters must use the keyword %<class%> or %<typename%>");
       aggr = class_type_node;
     }
 
index 384b1d13bd6174b22a72e6dcfad90d1e82754dd0..c83d33a5d6e6152f6d2691b20c11c4a053cae30d 100644 (file)
@@ -4325,7 +4325,7 @@ cxx_mark_addressable (tree exp)
       case PARM_DECL:
        if (x == current_class_ptr)
          {
-            error ("cannot take the address of `this', which is an rvalue expression");
+            error ("cannot take the address of %<this%>, which is an rvalue expression");
            TREE_ADDRESSABLE (x) = 1; /* so compiler doesn't die later.  */
            return true;
          }
@@ -4344,7 +4344,7 @@ cxx_mark_addressable (tree exp)
       case RESULT_DECL:
        if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x)
            && !DECL_ARTIFICIAL (x) && extra_warnings)
-         warning ("address requested for %qD, which is declared `register'",
+         warning ("address requested for %qD, which is declared %<register%>",
                    x);
        TREE_ADDRESSABLE (x) = 1;
        return true;
@@ -4863,7 +4863,7 @@ build_reinterpret_cast_1 (tree type, tree expr, bool c_cast_p,
       if (TYPE_PTR_P (intype)
          && (comptypes (TREE_TYPE (intype), TREE_TYPE (type),
                         COMPARE_BASE | COMPARE_DERIVED)))
-       warning ("casting `%T' to `%T' does not dereference pointer",
+       warning ("casting %qT to %qT does not dereference pointer",
                 intype, type);
 
       expr = build_unary_op (ADDR_EXPR, expr, 0);
@@ -6144,7 +6144,7 @@ check_return_expr (tree retval)
      (This is a G++ extension, used to get better code for functions
      that call the `volatile' function.)  */
   if (TREE_THIS_VOLATILE (current_function_decl))
-    warning ("function declared `noreturn' has a `return' statement");
+    warning ("function declared %<noreturn%> has a %<return%> statement");
 
   /* Check for various simple errors.  */
   if (DECL_DESTRUCTOR_P (current_function_decl))
@@ -6184,7 +6184,7 @@ check_return_expr (tree retval)
      that's supposed to return a value.  */
   if (!retval && fn_returns_value_p)
     {
-      pedwarn ("return-statement with no value, in function returning '%T'",
+      pedwarn ("return-statement with no value, in function returning %qT",
               valtype);
       /* Clear this, so finish_function won't say that we reach the
         end of a non-void function (which we don't, we gave a
index 3952b9ff82c64f072dd406ed848b0a526d3f02e2..a45119a647e4fa4220102a733bfa0426e767a194 100644 (file)
@@ -2850,7 +2850,7 @@ output_operand_lossage (const char *msgid, ...)
 
   va_start (ap, msgid);
 
-  pfx_str = this_is_asm_operands ? _("invalid `asm': ") : "output_operand: ";
+  pfx_str = this_is_asm_operands ? _("invalid 'asm': ") : "output_operand: ";
   asprintf (&fmt_string, "%s%s", pfx_str, _(msgid));
   vasprintf (&new_message, fmt_string, ap);
 
@@ -3202,7 +3202,7 @@ output_asm_label (rtx x)
          && NOTE_LINE_NUMBER (x) == NOTE_INSN_DELETED_LABEL))
     ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x));
   else
-    output_operand_lossage ("`%%l' operand isn't a label");
+    output_operand_lossage ("'%%l' operand isn't a label");
 
   assemble_name (asm_out_file, buf);
 }
index f3eecba06218b84da447c7dca859f7a5290156a9..eda9e5ecb26a672f7bdb8ad54ed98514c54138ff 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -1266,7 +1266,7 @@ translate_options (int *argcp, const char *const **argvp)
 
                  else if (strchr (arginfo, '*') != 0)
                    {
-                     error ("incomplete `%s' option", option_map[j].name);
+                     error ("incomplete '%s' option", option_map[j].name);
                      break;
                    }
 
@@ -1277,7 +1277,7 @@ translate_options (int *argcp, const char *const **argvp)
                        {
                          if (i + 1 == argc)
                            {
-                             error ("missing argument to `%s' option",
+                             error ("missing argument to '%s' option",
                                     option_map[j].name);
                              break;
                            }
@@ -1290,7 +1290,7 @@ translate_options (int *argcp, const char *const **argvp)
                  else if (strchr (arginfo, 'o') == 0)
                    {
                      if (arg != 0)
-                       error ("extraneous argument to `%s' option",
+                       error ("extraneous argument to '%s' option",
                               option_map[j].name);
                      arg = 0;
                    }
@@ -2632,7 +2632,7 @@ add_sysrooted_prefix (struct path_prefix *pprefix, const char *prefix,
                      int require_machine_suffix, int os_multilib)
 {
   if (!IS_ABSOLUTE_PATH (prefix))
-    fatal ("system path `%s' is not absolute", prefix);
+    fatal ("system path '%s' is not absolute", prefix);
 
   if (target_system_root)
     {
@@ -3198,7 +3198,7 @@ process_command (int argc, const char **argv)
              argv += 2;
            }
          else
-           fatal ("`-%c' option must have argument", opt);
+           fatal ("'-%c' option must have argument", opt);
          if (opt == 'V')
            new_version = arg;
          else
@@ -3220,7 +3220,7 @@ process_command (int argc, const char **argv)
       new_argv[0] = new_argv0;
 
       execvp (new_argv0, new_argv);
-      fatal ("couldn't run `%s': %s", new_argv0, xstrerror (errno));
+      fatal ("couldn't run '%s': %s", new_argv0, xstrerror (errno));
     }
 
   /* Set up the default search paths.  If there is no GCC_EXEC_PREFIX,
@@ -3509,7 +3509,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
       else if (strcmp (argv[i], "-Xlinker") == 0)
        {
          if (i + 1 == argc)
-           fatal ("argument to `-Xlinker' is missing");
+           fatal ("argument to '-Xlinker' is missing");
 
          n_infiles++;
          i++;
@@ -3517,21 +3517,21 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
       else if (strcmp (argv[i], "-Xpreprocessor") == 0)
        {
          if (i + 1 == argc)
-           fatal ("argument to `-Xpreprocessor' is missing");
+           fatal ("argument to '-Xpreprocessor' is missing");
 
          add_preprocessor_option (argv[i+1], strlen (argv[i+1]));
        }
       else if (strcmp (argv[i], "-Xassembler") == 0)
        {
          if (i + 1 == argc)
-           fatal ("argument to `-Xassembler' is missing");
+           fatal ("argument to '-Xassembler' is missing");
 
          add_assembler_option (argv[i+1], strlen (argv[i+1]));
        }
       else if (strcmp (argv[i], "-l") == 0)
        {
          if (i + 1 == argc)
-           fatal ("argument to `-l' is missing");
+           fatal ("argument to '-l' is missing");
 
          n_infiles++;
          i++;
@@ -3552,7 +3552,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
        {
          struct user_specs *user = xmalloc (sizeof (struct user_specs));
          if (++i >= argc)
-           fatal ("argument to `-specs' is missing");
+           fatal ("argument to '-specs' is missing");
 
          user->next = (struct user_specs *) 0;
          user->filename = argv[i];
@@ -3566,7 +3566,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
        {
          struct user_specs *user = xmalloc (sizeof (struct user_specs));
          if (strlen (argv[i]) == 7)
-           fatal ("argument to `-specs=' is missing");
+           fatal ("argument to '-specs=' is missing");
 
          user->next = (struct user_specs *) 0;
          user->filename = argv[i] + 7;
@@ -3603,7 +3603,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
            {
            case 'b':
            case 'V':
-             fatal ("`-%c' must come at the start of the command line", c);
+             fatal ("'-%c' must come at the start of the command line", c);
              break;
 
            case 'B':
@@ -3612,7 +3612,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
                int len;
 
                if (p[1] == 0 && i + 1 == argc)
-                 fatal ("argument to `-B' is missing");
+                 fatal ("argument to '-B' is missing");
                if (p[1] == 0)
                  value = argv[++i];
                else
@@ -4001,7 +4001,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
          if (c == 'x')
            {
              if (p[1] == 0 && i + 1 == argc)
-               fatal ("argument to `-x' is missing");
+               fatal ("argument to '-x' is missing");
              if (p[1] == 0)
                spec_lang = argv[++i];
              else
@@ -4029,7 +4029,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
                  n_args = SWITCH_TAKES_ARG (c) - (p[1] != 0);
                }
              if (i + n_args >= argc)
-               fatal ("argument to `-%s' is missing", p);
+               fatal ("argument to '-%s' is missing", p);
              switches[n_switches].args
                = xmalloc ((n_args + 1) * sizeof(const char *));
              while (j < n_args)
@@ -4090,7 +4090,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
     }
 
   if (n_infiles == last_language_n_infiles && spec_lang != 0)
-    error ("warning: `-x %s' after last input file has no effect", spec_lang);
+    error ("warning: '-x %s' after last input file has no effect", spec_lang);
 
   /* Ensure we only invoke each subprocess once.  */
   if (target_help_flag || print_help_list)
@@ -4733,7 +4733,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
                    p += 2;
                    /* We don't support extra suffix characters after %O.  */
                    if (*p == '.' || ISALPHA ((unsigned char) *p))
-                     fatal ("spec '%s' has invalid `%%0%c'", spec, *p);
+                     fatal ("spec '%s' has invalid '%%0%c'", spec, *p);
                    if (suffix_length == 0)
                      suffix = TARGET_OBJECT_SUFFIX;
                    else
@@ -4930,7 +4930,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
              int cur_index = argbuf_index;
              /* Handle the {...} following the %W.  */
              if (*p != '{')
-               fatal ("spec `%s' has invalid `%%W%c", spec, *p);
+               fatal ("spec '%s' has invalid '%%W%c", spec, *p);
              p = handle_braces (p + 1);
              if (p == 0)
                return -1;
@@ -4961,7 +4961,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
 
              /* Skip past the option value and make a copy.  */
              if (*p != '{')
-               fatal ("spec `%s' has invalid `%%x%c'", spec, *p);
+               fatal ("spec '%s' has invalid '%%x%c'", spec, *p);
              while (*p++ != '}')
                ;
              string = save_string (p1 + 1, p - p1 - 2);
@@ -5342,7 +5342,7 @@ eval_spec_function (const char *func, const char *args)
 
   sf = lookup_spec_function (func);
   if (sf == NULL)
-    fatal ("unknown spec function `%s'", func);
+    fatal ("unknown spec function '%s'", func);
 
   /* Push the spec processing context.  */
   save_argbuf_index = argbuf_index;
@@ -5361,7 +5361,7 @@ eval_spec_function (const char *func, const char *args)
 
   alloc_args ();
   if (do_spec_2 (args) < 0)
-    fatal ("error in args to spec function `%s'", func);
+    fatal ("error in args to spec function '%s'", func);
 
   /* argbuf_index is an index for the next argument to be inserted, and
      so contains the count of the args already inserted.  */
@@ -5654,7 +5654,7 @@ handle_braces (const char *p)
   return p;
   
  invalid:
-  fatal ("braced spec `%s' is invalid at `%c'", orig, *p);
+  fatal ("braced spec '%s' is invalid at '%c'", orig, *p);
   
 #undef SKIP_WHITE
 }
@@ -5742,7 +5742,7 @@ process_brace_body (const char *p, const char *atom, const char *end_atom,
   return p;
 
  invalid:
-  fatal ("braced spec body `%s' is invalid", body);
+  fatal ("braced spec body '%s' is invalid", body);
 }
 \f
 /* Return 0 iff switch number SWITCHNUM is obsoleted by a later switch
@@ -6271,7 +6271,7 @@ main (int argc, const char **argv)
 
   for (i = 0; (int) i < n_switches; i++)
     if (! switches[i].validated)
-      error ("unrecognized option `-%s'", switches[i].part1);
+      error ("unrecognized option '-%s'", switches[i].part1);
 
   /* Obey some of the options.  */
 
@@ -6467,7 +6467,7 @@ main (int argc, const char **argv)
                  value = do_spec (input_file_compiler->spec);
                  infiles[i].preprocessed = true;
                  if (!have_o_argbuf_index)
-                   fatal ("spec `%s' is invalid", input_file_compiler->spec);
+                   fatal ("spec '%s' is invalid", input_file_compiler->spec);
                  infiles[i].name = argbuf[have_o_argbuf_index];
                  infiles[i].incompiler
                    = lookup_compiler (infiles[i].name,
@@ -6935,7 +6935,7 @@ used_arg (const char *p, int len)
              if (*q == '\0')
                {
                invalid_matches:
-                 fatal ("multilib spec `%s' is invalid", multilib_matches);
+                 fatal ("multilib spec '%s' is invalid", multilib_matches);
                }
              q++;
            }
@@ -7127,7 +7127,7 @@ set_multilib_dir (void)
          if (*p == '\0')
            {
            invalid_exclusions:
-             fatal ("multilib exclusions `%s' is invalid",
+             fatal ("multilib exclusions '%s' is invalid",
                     multilib_exclusions);
            }
 
@@ -7185,7 +7185,7 @@ set_multilib_dir (void)
          if (*p == '\0')
            {
            invalid_select:
-             fatal ("multilib select `%s' is invalid",
+             fatal ("multilib select '%s' is invalid",
                     multilib_select);
            }
          ++p;
@@ -7326,7 +7326,7 @@ print_multilib_info (void)
          if (*p == '\0')
            {
            invalid_select:
-             fatal ("multilib select `%s' is invalid", multilib_select);
+             fatal ("multilib select '%s' is invalid", multilib_select);
            }
          
          ++p;
@@ -7364,7 +7364,7 @@ print_multilib_info (void)
                if (*e == '\0')
                  {
                  invalid_exclusion:
-                   fatal ("multilib exclusion `%s' is invalid",
+                   fatal ("multilib exclusion '%s' is invalid",
                           multilib_exclusions);
                  }
 
index 83515967cddd02c7c445142c859cec12a5fe7323..ee4d6b9aa80e338457b2a1db3a090526489580ca 100644 (file)
@@ -537,16 +537,16 @@ process_file (const char *file_name)
 
          if (gcov_file)
            {
-             fnotice (stdout, "%s:creating `%s'\n",
+             fnotice (stdout, "%s:creating '%s'\n",
                       src->name, gcov_file_name);
              output_lines (gcov_file, src);
              if (ferror (gcov_file))
-                   fnotice (stderr, "%s:error writing output file `%s'\n",
+                   fnotice (stderr, "%s:error writing output file '%s'\n",
                             src->name, gcov_file_name);
              fclose (gcov_file);
            }
          else
-           fnotice (stderr, "%s:could not open output file `%s'\n",
+           fnotice (stderr, "%s:could not open output file '%s'\n",
                     src->name, gcov_file_name);
          free (gcov_file_name);
        }
@@ -716,7 +716,7 @@ read_graph_file (void)
       GCOV_UNSIGNED2STRING (v, version);
       GCOV_UNSIGNED2STRING (e, GCOV_VERSION);
 
-      fnotice (stderr, "%s:version `%.4s', prefer `%.4s'\n",
+      fnotice (stderr, "%s:version '%.4s', prefer '%.4s'\n",
               bbg_file_name, v, e);
     }
   bbg_stamp = gcov_read_unsigned ();
@@ -768,7 +768,7 @@ read_graph_file (void)
       else if (fn && tag == GCOV_TAG_BLOCKS)
        {
          if (fn->blocks)
-           fnotice (stderr, "%s:already seen blocks for `%s'\n",
+           fnotice (stderr, "%s:already seen blocks for '%s'\n",
                     bbg_file_name, fn->name);
          else
            {
@@ -978,7 +978,7 @@ read_count_file (void)
       GCOV_UNSIGNED2STRING (v, version);
       GCOV_UNSIGNED2STRING (e, GCOV_VERSION);
       
-      fnotice (stderr, "%s:version `%.4s', prefer version `%.4s'\n",
+      fnotice (stderr, "%s:version '%.4s', prefer version '%.4s'\n",
               da_file_name, v, e);
     }
   tag = gcov_read_unsigned ();
@@ -1010,7 +1010,7 @@ read_count_file (void)
                fn_n = NULL;
              else
                {
-                 fnotice (stderr, "%s:unknown function `%u'\n",
+                 fnotice (stderr, "%s:unknown function '%u'\n",
                           da_file_name, ident);
                  break;
                }
@@ -1023,7 +1023,7 @@ read_count_file (void)
          else if (gcov_read_unsigned () != fn->checksum)
            {
            mismatch:;
-             fnotice (stderr, "%s:profile mismatch for `%s'\n",
+             fnotice (stderr, "%s:profile mismatch for '%s'\n",
                       da_file_name, fn->name);
              goto cleanup;
            }
@@ -1066,12 +1066,12 @@ solve_flow_graph (function_t *fn)
   block_t *invalid_blocks = NULL;  /* invalid, but inferable blocks.  */
 
   if (fn->num_blocks < 2)
-    fnotice (stderr, "%s:`%s' lacks entry and/or exit blocks\n",
+    fnotice (stderr, "%s:'%s' lacks entry and/or exit blocks\n",
             bbg_file_name, fn->name);
   else
     {
       if (fn->blocks[0].num_pred)
-       fnotice (stderr, "%s:`%s' has arcs to entry block\n",
+       fnotice (stderr, "%s:'%s' has arcs to entry block\n",
                 bbg_file_name, fn->name);
       else
        /* We can't deduce the entry block counts from the lack of
@@ -1079,7 +1079,7 @@ solve_flow_graph (function_t *fn)
        fn->blocks[0].num_pred = ~(unsigned)0;
 
       if (fn->blocks[fn->num_blocks - 1].num_succ)
-       fnotice (stderr, "%s:`%s' has arcs from exit block\n",
+       fnotice (stderr, "%s:'%s' has arcs from exit block\n",
                 bbg_file_name, fn->name);
       else
        /* Likewise, we can't deduce exit block counts from the lack
@@ -1287,7 +1287,7 @@ solve_flow_graph (function_t *fn)
   for (ix = 0; ix < fn->num_blocks; ix++)
     if (!fn->blocks[ix].count_valid)
       {
-       fnotice (stderr, "%s:graph is unsolvable for `%s'\n",
+       fnotice (stderr, "%s:graph is unsolvable for '%s'\n",
                 bbg_file_name, fn->name);
        break;
       }
@@ -1367,7 +1367,7 @@ format_gcov (gcov_type top, gcov_type bottom, int dp)
 static void
 function_summary (const coverage_t *coverage, const char *title)
 {
-  fnotice (stdout, "%s `%s'\n", title, coverage->name);
+  fnotice (stdout, "%s '%s'\n", title, coverage->name);
 
   if (coverage->lines)
     fnotice (stdout, "Lines executed:%s of %d\n",
@@ -1537,7 +1537,7 @@ add_line_counts (coverage_t *coverage, function_t *fn)
        }
     }
   if (!line)
-    fnotice (stderr, "%s:no lines for `%s'\n", bbg_file_name, fn->name);
+    fnotice (stderr, "%s:no lines for '%s'\n", bbg_file_name, fn->name);
 }
 
 /* Accumulate the line counts of a file.  */
@@ -1796,7 +1796,7 @@ output_lines (FILE *gcov_file, const source_t *src)
       if (!fstat (fileno (source_file), &status)
          && status.st_mtime > bbg_file_time)
        {
-         fnotice (stderr, "%s:source file is newer than graph file `%s'\n",
+         fnotice (stderr, "%s:source file is newer than graph file '%s'\n",
                   src->name, bbg_file_name);
          fprintf (gcov_file, "%9s:%5d:Source is newer than graph\n",
                   "-", 0);
index 0b2be046f48c111bc6f9a11ec38133d863323389..bf9096c799b03b617d3860ee00607a4f1e5d572d 100644 (file)
@@ -1,3 +1,7 @@
+2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
+
+       * objc-act.c: Use %q, %< and %> for quoting in diagnostics.
+
 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR objc/16546
index 4e95ce63edda1a4314e5709ec437adc9939e2597..9e289936f262661789d6e9e1877cd5ccd213c783 100644 (file)
@@ -750,7 +750,7 @@ objc_finish_implementation (void)
       objc_implementation_context = NULL_TREE;
     }
   else
-    warning ("`@end' must appear in an @implementation context");
+    warning ("%<@end%> must appear in an @implementation context");
 }
 
 void
@@ -898,7 +898,7 @@ objc_comptypes (tree lhs, tree rhs, int reflexive)
 
                      if (!rproto)
                        warning
-                         ("object does not conform to the `%s' protocol",
+                         ("object does not conform to the %qs protocol",
                           IDENTIFIER_POINTER (PROTOCOL_NAME (p)));
                    }
                  return 1;
@@ -988,7 +988,7 @@ objc_comptypes (tree lhs, tree rhs, int reflexive)
                    }
 
                  if (!rproto)
-                   warning ("class `%s' does not implement the `%s' protocol",
+                   warning ("class %qs does not implement the %qs protocol",
                             IDENTIFIER_POINTER (OBJC_TYPE_NAME (TREE_TYPE (rhs))),
                             IDENTIFIER_POINTER (PROTOCOL_NAME (p)));
                }
@@ -1065,7 +1065,7 @@ objc_comptypes (tree lhs, tree rhs, int reflexive)
                        }
                
                      if (!lproto)
-                       warning ("class `%s' does not implement the `%s' protocol",
+                       warning ("class %qs does not implement the %qs protocol",
                                 IDENTIFIER_POINTER (OBJC_TYPE_NAME
                                                     (TREE_TYPE (lhs))),
                                 IDENTIFIER_POINTER (PROTOCOL_NAME (p)));
@@ -1171,7 +1171,7 @@ objc_check_decl (tree decl)
   if (TREE_CODE (type) != RECORD_TYPE)
     return;
   if (OBJC_TYPE_NAME (type) && (type = objc_is_class_name (OBJC_TYPE_NAME (type))))
-    error ("statically allocated instance of Objective-C class `%s'",
+    error ("statically allocated instance of Objective-C class %qs",
           IDENTIFIER_POINTER (type));
 }
 
@@ -1228,7 +1228,7 @@ check_protocol_recursively (tree proto, tree list)
        pp = lookup_protocol (pp);
 
       if (pp == proto)
-       fatal_error ("protocol `%s' has circular dependency",
+       fatal_error ("protocol %qs has circular dependency",
                     IDENTIFIER_POINTER (PROTOCOL_NAME (pp)));
       if (pp)
        check_protocol_recursively (proto, PROTOCOL_LIST (pp));
@@ -1250,7 +1250,7 @@ lookup_and_install_protocols (tree protocols)
       tree p = lookup_protocol (ident);
 
       if (!p)
-       error ("cannot find protocol declaration for `%s'",
+       error ("cannot find protocol declaration for %qs",
               IDENTIFIER_POINTER (ident));
       else
        return_value = chainon (return_value,
@@ -1646,16 +1646,16 @@ objc_build_string_object (tree string)
       if (!constant_string_class
          || !(constant_string_type
               = CLASS_STATIC_TEMPLATE (constant_string_class)))
-       error ("cannot find interface declaration for `%s'",
+       error ("cannot find interface declaration for %qs",
               IDENTIFIER_POINTER (constant_string_id));
       /* The NSConstantString/NXConstantString ivar layout is now known.  */
       else if (!check_string_class_template ())
-       error ("interface `%s' does not have valid constant string layout",
+       error ("interface %qs does not have valid constant string layout",
               IDENTIFIER_POINTER (constant_string_id));
       /* For the NeXT runtime, we can generate a literal reference
         to the string class, don't need to run a constructor.  */
       else if (flag_next_runtime && !setup_string_decl ())
-       error ("cannot find reference tag for class `%s'",
+       error ("cannot find reference tag for class %qs",
               IDENTIFIER_POINTER (constant_string_id));
       else
        {
@@ -2515,7 +2515,7 @@ objc_get_class_reference (tree ident)
 
   if (!(ident = objc_is_class_name (ident)))
     {
-      error ("`%s' is not an Objective-C class name or alias",
+      error ("%qs is not an Objective-C class name or alias",
             IDENTIFIER_POINTER (orig_ident));
       return error_mark_node;
     }
@@ -2635,9 +2635,9 @@ objc_declare_alias (tree alias_ident, tree class_ident)
 #endif /* OBJCPLUS */
 
   if (!(underlying_class = objc_is_class_name (class_ident)))
-    warning ("cannot find class `%s'", IDENTIFIER_POINTER (class_ident));
+    warning ("cannot find class %qs", IDENTIFIER_POINTER (class_ident));
   else if (objc_is_class_name (alias_ident))
-    warning ("class `%s' already exists", IDENTIFIER_POINTER (alias_ident));
+    warning ("class %qs already exists", IDENTIFIER_POINTER (alias_ident));
   else
     alias_chain = tree_cons (underlying_class, alias_ident, alias_chain);
 }
@@ -2662,7 +2662,7 @@ objc_declare_class (tree ident_list)
        
          if (record && ! TREE_STATIC_TEMPLATE (record))
            {
-             error ("`%s' redeclared as different kind of symbol",
+             error ("%qs redeclared as different kind of symbol",
                     IDENTIFIER_POINTER (ident));
              error ("%Jprevious declaration of '%D'",
                     record, record);
@@ -2780,7 +2780,7 @@ objc_get_class_ivars (tree class_name)
   if (interface)
     return get_class_ivars (interface);
 
-  error ("cannot find interface declaration for `%s'",
+  error ("cannot find interface declaration for %qs",
         IDENTIFIER_POINTER (class_name));
 
   return error_mark_node;
@@ -3290,7 +3290,7 @@ objc_finish_try_stmt (void)
   tree stmt;
 
   if (c->catch_list == NULL && c->finally_body == NULL)
-    error ("`@try' without `@catch' or `@finally'");
+    error ("%<@try%> without %<@catch%> or %<@finally%>");
 
   /* If we're doing Darwin setjmp exceptions, build the big nasty.  */
   if (flag_objc_sjlj_exceptions)
@@ -4226,7 +4226,7 @@ synth_forward_declarations (void)
 static void
 error_with_ivar (const char *message, tree decl)
 {
-  error ("%J%s `%s'", decl,
+  error ("%J%s %qs", decl,
          message, gen_declaration (decl));
 
 }
@@ -5326,7 +5326,7 @@ check_duplicates (hash hsh, int methods, int is_class)
             different types.  */
          attr loop;
 
-         warning ("multiple %s named `%c%s' found",
+         warning ("multiple %s named %<%c%s%> found",
                   methods ? "methods" : "selectors",
                   (is_class ? '+' : '-'),
                   IDENTIFIER_POINTER (METHOD_SEL_NAME (meth)));
@@ -5551,7 +5551,7 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params)
        {
          if (!CLASS_SUPER_NAME (implementation_template))
            {
-             error ("no super class declared in @interface for `%s'",
+             error ("no super class declared in @interface for %qs",
                     IDENTIFIER_POINTER (CLASS_NAME (implementation_template)));
              return error_mark_node;
            }
@@ -5592,7 +5592,7 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params)
                = lookup_method_in_protocol_list (rprotos, sel_name, 0);
 
              if (method_prototype)
-               warning ("found `-%s' instead of `+%s' in protocol(s)",
+               warning ("found %<-%s%> instead of %<+%s%> in protocol(s)",
                         IDENTIFIER_POINTER (sel_name),
                         IDENTIFIER_POINTER (sel_name));
            }
@@ -5651,7 +5651,7 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params)
        }
       else
        {
-         warning ("invalid receiver type `%s'",
+         warning ("invalid receiver type %qs",
                   gen_type_name (orig_rtype));
          /* After issuing the "invalid receiver" warning, perform method
             lookup as if we were messaging 'id'.  */
@@ -5666,7 +5666,7 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params)
   if (!method_prototype)
     {
       if (rprotos)
-       warning ("`%c%s' not found in protocol(s)",
+       warning ("%<%c%s%> not found in protocol(s)",
                 (class_tree ? '+' : '-'),
                 IDENTIFIER_POINTER (sel_name));
 
@@ -5680,7 +5680,7 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params)
       static bool warn_missing_methods = false;
 
       if (rtype)
-       warning ("`%s' may not respond to `%c%s'",
+       warning ("%qs may not respond to %<%c%s%>",
                 IDENTIFIER_POINTER (OBJC_TYPE_NAME (rtype)),
                 (class_tree ? '+' : '-'),
                 IDENTIFIER_POINTER (sel_name));
@@ -5688,15 +5688,15 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params)
         then we have failed to find _any_ instance or class method,
         respectively.  */
       else
-       warning ("no `%c%s' method found",
+       warning ("no %<%c%s%> method found",
                 (class_tree ? '+' : '-'),
                 IDENTIFIER_POINTER (sel_name));
 
       if (!warn_missing_methods)
        {
          warning ("(Messages without a matching method signature");
-         warning ("will be assumed to return `id' and accept");
-         warning ("`...' as arguments.)");
+         warning ("will be assumed to return %<id%> and accept");
+         warning ("%<...%> as arguments.)");
          warn_missing_methods = true;
        }
     }
@@ -5828,7 +5828,7 @@ objc_build_protocol_expr (tree protoname)
 
   if (!p)
     {
-      error ("cannot find protocol declaration for `%s'",
+      error ("cannot find protocol declaration for %qs",
             IDENTIFIER_POINTER (protoname));
       return error_mark_node;
     }
@@ -5927,7 +5927,7 @@ objc_build_selector_expr (tree selnamelist)
       /* If still not found, print out a warning.  */
       if (!hsh)
        {
-         warning ("undeclared selector `%s'", IDENTIFIER_POINTER (selname));
+         warning ("undeclared selector %qs", IDENTIFIER_POINTER (selname));
        }
     }
 
@@ -5969,7 +5969,7 @@ build_ivar_reference (tree id)
         to an instance variable.  It's better to catch the cases
         where this is done unknowingly than to support the above
         paradigm.  */
-      warning ("instance variable `%s' accessed in class method",
+      warning ("instance variable %qs accessed in class method",
               IDENTIFIER_POINTER (id));
       self_decl = convert (objc_instance_type, self_decl); /* cast */
     }
@@ -6181,7 +6181,7 @@ objc_add_method (tree class, tree method, int is_class)
       if ((TREE_CODE (class) == CLASS_INTERFACE_TYPE
           || TREE_CODE (class) == CATEGORY_INTERFACE_TYPE)
          && !comp_proto_with_proto (method, mth))
-       error ("duplicate declaration of method `%c%s'",
+       error ("duplicate declaration of method %<%c%s%>",
                is_class ? '+' : '-', 
                IDENTIFIER_POINTER (METHOD_SEL_NAME (mth)));
     }
@@ -6226,7 +6226,7 @@ add_category (tree class, tree category)
 
   if (cat)
     {
-      warning ("duplicate interface declaration for category `%s(%s)'",
+      warning ("duplicate interface declaration for category %<%s(%s)%>",
               IDENTIFIER_POINTER (CLASS_NAME (class)),
               IDENTIFIER_POINTER (CLASS_SUPER_NAME (category)));
     }
@@ -6253,7 +6253,7 @@ add_instance_variable (tree class, int public, tree field_decl)
 #ifdef OBJCPLUS
   if (TREE_CODE (field_type) == REFERENCE_TYPE)
     {
-      error ("illegal reference type specified for instance variable `%s'",
+      error ("illegal reference type specified for instance variable %qs",
             ivar_name);
       /* Return class as is without adding this ivar.  */
       return class;
@@ -6264,7 +6264,7 @@ add_instance_variable (tree class, int public, tree field_decl)
       || TYPE_SIZE (field_type) == error_mark_node)
       /* 'type[0]' is allowed, but 'type[]' is not! */
     {
-      error ("instance variable `%s' has unknown size", ivar_name);
+      error ("instance variable %qs has unknown size", ivar_name);
       /* Return class as is without adding this ivar.  */
       return class;
     }
@@ -6278,8 +6278,8 @@ add_instance_variable (tree class, int public, tree field_decl)
       const char *type_name = IDENTIFIER_POINTER (OBJC_TYPE_NAME (field_type));
       if(TYPE_POLYMORPHIC_P (field_type)) {
         /* vtable pointers are Real Bad(tm), since Obj-C cannot initialize them */
-        error ("type `%s' has virtual member functions", type_name);
-        error ("illegal aggregate type `%s' specified for instance variable `%s'",
+        error ("type %qs has virtual member functions", type_name);
+        error ("illegal aggregate type %qs specified for instance variable %qs",
               type_name, ivar_name);
         /* Return class as is without adding this ivar.  */
         return class;
@@ -6287,9 +6287,9 @@ add_instance_variable (tree class, int public, tree field_decl)
       /* user-defined constructors and destructors are not known to Obj-C and
          hence will not be called.  This may or may not be a problem. */
       if (TYPE_NEEDS_CONSTRUCTING (field_type))
-        warning ("type `%s' has a user-defined constructor", type_name);
+        warning ("type %qs has a user-defined constructor", type_name);
       if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (field_type))
-        warning ("type `%s' has a user-defined destructor", type_name);
+        warning ("type %qs has a user-defined destructor", type_name);
       warning ("C++ constructors and destructors will not be invoked for Objective-C fields");
     }
 #endif
@@ -6356,7 +6356,7 @@ objc_is_public (tree expr, tree identifier)
        {
          if (!lookup_interface (OBJC_TYPE_NAME (basetype)))
            {
-             error ("cannot find interface declaration for `%s'",
+             error ("cannot find interface declaration for %qs",
                     IDENTIFIER_POINTER (OBJC_TYPE_NAME (basetype)));
              return 0;
            }
@@ -6380,7 +6380,7 @@ objc_is_public (tree expr, tree identifier)
                  int private = is_private (decl);
 
                  if (private)
-                   error ("instance variable `%s' is declared private",
+                   error ("instance variable %qs is declared private",
                           IDENTIFIER_POINTER (DECL_NAME (decl)));
                  return !private;
                }
@@ -6389,14 +6389,14 @@ objc_is_public (tree expr, tree identifier)
                 non-@public ivars.  We will let this slide for now...  */
              if (!objc_method_context)
              {
-               warning ("instance variable `%s' is %s; "
+               warning ("instance variable %qs is %s; "
                         "this will be a hard error in the future",
                         IDENTIFIER_POINTER (identifier),
                         TREE_PRIVATE (decl) ? "@private" : "@protected");
                return 1;
              }
                
-             error ("instance variable `%s' is declared %s",
+             error ("instance variable %qs is declared %s",
                     IDENTIFIER_POINTER (identifier),
                     TREE_PRIVATE (decl) ? "private" : "protected");
              return 0;
@@ -6406,7 +6406,7 @@ objc_is_public (tree expr, tree identifier)
       else if (objc_implementation_context && (basetype == objc_object_reference))
        {
          expr = convert (uprivate_record, expr);
-         warning ("static access to object of type `id'");
+         warning ("static access to object of type %<id%>");
        }
     }
 
@@ -6428,16 +6428,16 @@ check_methods (tree chain, tree list, int mtype)
            {
              if (TREE_CODE (objc_implementation_context)
                  == CLASS_IMPLEMENTATION_TYPE)
-               warning ("incomplete implementation of class `%s'",
+               warning ("incomplete implementation of class %qs",
                         IDENTIFIER_POINTER (CLASS_NAME (objc_implementation_context)));
              else if (TREE_CODE (objc_implementation_context)
                       == CATEGORY_IMPLEMENTATION_TYPE)
-               warning ("incomplete implementation of category `%s'",
+               warning ("incomplete implementation of category %qs",
                         IDENTIFIER_POINTER (CLASS_SUPER_NAME (objc_implementation_context)));
              first = 0;
            }
 
-         warning ("method definition for `%c%s' not found",
+         warning ("method definition for %<%c%s%> not found",
                   mtype, IDENTIFIER_POINTER (METHOD_SEL_NAME (chain)));
        }
 
@@ -6516,17 +6516,17 @@ check_methods_accessible (tree chain, tree context, int mtype)
            {
              if (TREE_CODE (objc_implementation_context)
                  == CLASS_IMPLEMENTATION_TYPE)
-               warning ("incomplete implementation of class `%s'",
+               warning ("incomplete implementation of class %qs",
                         IDENTIFIER_POINTER
                           (CLASS_NAME (objc_implementation_context)));
              else if (TREE_CODE (objc_implementation_context)
                       == CATEGORY_IMPLEMENTATION_TYPE)
-               warning ("incomplete implementation of category `%s'",
+               warning ("incomplete implementation of category %qs",
                         IDENTIFIER_POINTER
                           (CLASS_SUPER_NAME (objc_implementation_context)));
              first = 0;
            }
-         warning ("method definition for `%c%s' not found",
+         warning ("method definition for %<%c%s%> not found",
                   mtype, IDENTIFIER_POINTER (METHOD_SEL_NAME (chain)));
        }
 
@@ -6567,7 +6567,7 @@ check_protocol (tree p, const char *type, const char *name)
        }
 
       if (!f1 || !f2)
-       warning ("%s `%s' does not fully implement the `%s' protocol",
+       warning ("%s %qs does not fully implement the %qs protocol",
                 type, name, IDENTIFIER_POINTER (PROTOCOL_NAME (p)));
     }
 
@@ -6625,7 +6625,7 @@ start_class (enum tree_code code, tree class_name, tree super_name,
 
   if (objc_implementation_context)
     {
-      warning ("`@end' missing in implementation context");
+      warning ("%<@end%> missing in implementation context");
       finish_class (objc_implementation_context);
       objc_ivar_chain = NULL_TREE;
       objc_implementation_context = NULL_TREE;
@@ -6638,7 +6638,7 @@ start_class (enum tree_code code, tree class_name, tree super_name,
   if ((code == CLASS_INTERFACE_TYPE || code == CLASS_IMPLEMENTATION_TYPE)
       && super_name && !objc_is_class_name (super_name))
     {
-      error ("cannot find interface declaration for `%s', superclass of `%s'",
+      error ("cannot find interface declaration for %qs, superclass of %qs",
             IDENTIFIER_POINTER (super_name),
             IDENTIFIER_POINTER (class_name));
       super_name = NULL_TREE;
@@ -6651,7 +6651,7 @@ start_class (enum tree_code code, tree class_name, tree super_name,
   if (! objc_is_class_name (class_name)
       && (decl = lookup_name (class_name)))
     {
-      error ("`%s' redeclared as different kind of symbol",
+      error ("%qs redeclared as different kind of symbol",
             IDENTIFIER_POINTER (class_name));
       error ("%Jprevious declaration of '%D'",
             decl, decl);
@@ -6665,7 +6665,7 @@ start_class (enum tree_code code, tree class_name, tree super_name,
         for (chain = implemented_classes; chain; chain = TREE_CHAIN (chain))
            if (TREE_VALUE (chain) == class_name)
             {
-              error ("reimplementation of class `%s'",
+              error ("reimplementation of class %qs",
                      IDENTIFIER_POINTER (class_name));
               return error_mark_node;
             }
@@ -6682,7 +6682,7 @@ start_class (enum tree_code code, tree class_name, tree super_name,
 
       if (!(implementation_template = lookup_interface (class_name)))
         {
-         warning ("cannot find interface declaration for `%s'",
+         warning ("cannot find interface declaration for %qs",
                   IDENTIFIER_POINTER (class_name));
          add_class (implementation_template = objc_implementation_context);
         }
@@ -6696,9 +6696,9 @@ start_class (enum tree_code code, tree class_name, tree super_name,
          tree previous_name = CLASS_SUPER_NAME (implementation_template);
           const char *const name =
            previous_name ? IDENTIFIER_POINTER (previous_name) : "";
-         error ("conflicting super class name `%s'",
+         error ("conflicting super class name %qs",
                 IDENTIFIER_POINTER (super_name));
-         error ("previous declaration of `%s'", name);
+         error ("previous declaration of %qs", name);
         }
 
       else if (! super_name)
@@ -6712,9 +6712,9 @@ start_class (enum tree_code code, tree class_name, tree super_name,
     {
       if (lookup_interface (class_name))
 #ifdef OBJCPLUS
-       error ("duplicate interface declaration for class `%s'",
+       error ("duplicate interface declaration for class %qs",
 #else
-       warning ("duplicate interface declaration for class `%s'",
+       warning ("duplicate interface declaration for class %qs",
 #endif 
         IDENTIFIER_POINTER (class_name));
       else
@@ -6735,7 +6735,7 @@ start_class (enum tree_code code, tree class_name, tree super_name,
 
       if (!(class_category_is_assoc_with = lookup_interface (class_name)))
        {
-         error ("cannot find interface declaration for `%s'",
+         error ("cannot find interface declaration for %qs",
                 IDENTIFIER_POINTER (class_name));
          exit (FATAL_EXIT_CODE);
        }
@@ -6760,7 +6760,7 @@ start_class (enum tree_code code, tree class_name, tree super_name,
 
       if (!(implementation_template = lookup_interface (class_name)))
         {
-         error ("cannot find interface declaration for `%s'",
+         error ("cannot find interface declaration for %qs",
                 IDENTIFIER_POINTER (class_name));
          exit (FATAL_EXIT_CODE);
         }
@@ -6974,7 +6974,7 @@ start_protocol (enum tree_code code, tree name, tree list)
     }
   else
     {
-      warning ("duplicate declaration for protocol `%s'",
+      warning ("duplicate declaration for protocol %qs",
               IDENTIFIER_POINTER (name));
     }
   return protocol;
@@ -7490,7 +7490,7 @@ static void
 warn_with_method (const char *message, int mtype, tree method)
 {
   /* Add a readable method name to the warning.  */
-  warning ("%J%s `%c%s'", method,
+  warning ("%J%s %<%c%s%>", method,
            message, mtype, gen_method_decl (method));
 }
 
@@ -7780,7 +7780,7 @@ get_super_receiver (void)
          /* Barf if super used in a category of Object.  */
          if (!super_name)
            {
-             error ("no super class declared in interface for `%s'",
+             error ("no super class declared in interface for %qs",
                    IDENTIFIER_POINTER (CLASS_NAME (implementation_template)));
              return error_mark_node;
            }
@@ -7874,7 +7874,7 @@ lang_report_error_function (tree decl)
 {
   if (objc_method_context)
     {
-      fprintf (stderr, "In method `%s'\n",
+      fprintf (stderr, "In method %qs\n",
               IDENTIFIER_POINTER (METHOD_SEL_NAME (objc_method_context)));
       return 1;
     }
@@ -8173,7 +8173,7 @@ finish_objc (void)
   /* A missing @end may not be detected by the parser.  */
   if (objc_implementation_context)
     {
-      warning ("`@end' missing in implementation context");
+      warning ("%<@end%> missing in implementation context");
       finish_class (objc_implementation_context);
       objc_ivar_chain = NULL_TREE;
       objc_implementation_context = NULL_TREE;
index 93a10d13e3551d19d041bcecbd60dc5763de2b3a..21b5b7bc0e397a81ca4d331de75a48ce9df53ab0 100644 (file)
@@ -1034,7 +1034,7 @@ handle_param (const char *carg)
     {
       value = integral_argument (equal + 1);
       if (value == -1)
-       error ("invalid --param value `%s'", equal + 1);
+       error ("invalid --param value %qs", equal + 1);
       else
        {
          *equal = '\0';
index 944da5b84402c0d27f55295b74090278e5de07ef..8a9b91c9bdbbf0a7198ef9bd57d9016595e57f42 100644 (file)
@@ -231,7 +231,7 @@ struct pretty_print_info
                  IDENTIFIER_POINTER (T) + IDENTIFIER_LENGTH (T))
 
 #define pp_unsupported_tree(PP, T)                         \
-  pp_verbatim (pp_base (PP), "#`%s' not supported by %s#", \
+  pp_verbatim (pp_base (PP), "#%qs not supported by %s#", \
                tree_code_name[(int) TREE_CODE (T)], __FUNCTION__)
 
 
index 7573432d250e1213aac9fd748acbf28d419990ad..093e4400817223498375b58a3982f710b5e78649 100644 (file)
@@ -579,7 +579,7 @@ safe_write (int desc, void *ptr, int len, const char *out_fname)
        if (errno_val == EINTR)
          continue;
 #endif
-       notice ("%s: error writing file `%s': %s\n",
+       notice ("%s: error writing file '%s': %s\n",
                pname, shortpath (NULL, out_fname), xstrerror (errno_val));
        return;
       }
@@ -732,7 +732,7 @@ file_normally_convertible (const char *path)
   if (access (path, R_OK))
     {
       if (!quiet_flag)
-       notice ("%s: warning: no read access for file `%s'\n",
+       notice ("%s: warning: no read access for file '%s'\n",
                pname, shortpath (NULL, path));
       return 0;
     }
@@ -740,7 +740,7 @@ file_normally_convertible (const char *path)
   if (access (path, W_OK))
     {
       if (!quiet_flag)
-       notice ("%s: warning: no write access for file `%s'\n",
+       notice ("%s: warning: no write access for file '%s'\n",
                pname, shortpath (NULL, path));
       return 0;
     }
@@ -748,7 +748,7 @@ file_normally_convertible (const char *path)
   if (access (dir_name, W_OK))
     {
       if (!quiet_flag)
-       notice ("%s: warning: no write access for dir containing `%s'\n",
+       notice ("%s: warning: no write access for dir containing '%s'\n",
                pname, shortpath (NULL, path));
       return 0;
     }
@@ -1633,7 +1633,7 @@ save_def_or_dec (const char *l, int is_syscalls)
          {
            if (strcmp (def_dec_p->ansi_decl, other->ansi_decl))
              {
-               notice ("%s:%d: declaration of function `%s' takes different forms\n",
+               notice ("%s:%d: declaration of function '%s' takes different forms\n",
                        def_dec_p->file->hash_entry->symbol,
                        def_dec_p->line,
                        def_dec_p->hash_entry->symbol);
@@ -1888,7 +1888,7 @@ gen_aux_info_file (const char *base_filename)
     concat (compile_params[input_file_name_index], aux_info_suffix, NULL);
 
   if (!quiet_flag)
-    notice ("%s: compiling `%s'\n",
+    notice ("%s: compiling '%s'\n",
            pname, compile_params[input_file_name_index]);
 
   {
@@ -1973,7 +1973,7 @@ start_over: ;
        {
          if (is_syscalls)
            {
-             notice ("%s: warning: missing SYSCALLS file `%s'\n",
+             notice ("%s: warning: missing SYSCALLS file '%s'\n",
                      pname, aux_info_filename);
              return;
            }
@@ -1982,7 +1982,7 @@ start_over: ;
       else
        {
          int errno_val = errno;
-         notice ("%s: can't read aux info file `%s': %s\n",
+         notice ("%s: can't read aux info file '%s': %s\n",
                  pname, shortpath (NULL, aux_info_filename),
                  xstrerror (errno_val));
          errors++;
@@ -2011,7 +2011,7 @@ start_over: ;
       if (access (aux_info_filename, R_OK) == -1)
        {
          int errno_val = errno;
-         notice ("%s: can't read aux info file `%s': %s\n",
+         notice ("%s: can't read aux info file '%s': %s\n",
                  pname, shortpath (NULL, aux_info_filename),
                  xstrerror (errno_val));
          errors++;
@@ -2027,7 +2027,7 @@ start_over: ;
     if (stat (aux_info_filename, &stat_buf) == -1)
       {
        int errno_val = errno;
-       notice ("%s: can't get status of aux info file `%s': %s\n",
+       notice ("%s: can't get status of aux info file '%s': %s\n",
                pname, shortpath (NULL, aux_info_filename),
                xstrerror (errno_val));
        errors++;
@@ -2055,7 +2055,7 @@ start_over: ;
        if (stat (base_source_filename, &stat_buf) == -1)
          {
            int errno_val = errno;
-           notice ("%s: can't get status of aux info file `%s': %s\n",
+           notice ("%s: can't get status of aux info file '%s': %s\n",
                    pname, shortpath (NULL, base_source_filename),
                    xstrerror (errno_val));
            errors++;
@@ -2083,7 +2083,7 @@ start_over: ;
     if ((aux_info_file = open (aux_info_filename, fd_flags, 0444 )) == -1)
       {
        int errno_val = errno;
-       notice ("%s: can't open aux info file `%s' for reading: %s\n",
+       notice ("%s: can't open aux info file '%s' for reading: %s\n",
                pname, shortpath (NULL, aux_info_filename),
                xstrerror (errno_val));
        return;
@@ -2101,7 +2101,7 @@ start_over: ;
        (int) aux_info_size)
       {
        int errno_val = errno;
-       notice ("%s: error reading aux info file `%s': %s\n",
+       notice ("%s: error reading aux info file '%s': %s\n",
                pname, shortpath (NULL, aux_info_filename),
                xstrerror (errno_val));
        free (aux_info_base);
@@ -2114,7 +2114,7 @@ start_over: ;
     if (close (aux_info_file))
       {
        int errno_val = errno;
-       notice ("%s: error closing aux info file `%s': %s\n",
+       notice ("%s: error closing aux info file '%s': %s\n",
                pname, shortpath (NULL, aux_info_filename),
                xstrerror (errno_val));
        free (aux_info_base);
@@ -2130,7 +2130,7 @@ start_over: ;
     if (unlink (aux_info_filename) == -1)
       {
        int errno_val = errno;
-       notice ("%s: can't delete aux info file `%s': %s\n",
+       notice ("%s: can't delete aux info file '%s': %s\n",
                pname, shortpath (NULL, aux_info_filename),
                xstrerror (errno_val));
       }
@@ -2212,7 +2212,7 @@ start_over: ;
                if (keep_it && unlink (aux_info_filename) == -1)
                  {
                    int errno_val = errno;
-                   notice ("%s: can't delete file `%s': %s\n",
+                   notice ("%s: can't delete file '%s': %s\n",
                            pname, shortpath (NULL, aux_info_filename),
                            xstrerror (errno_val));
                    return;
@@ -2290,7 +2290,7 @@ rename_c_file (const hash_table_entry *hp)
   if (rename (filename, new_filename) == -1)
     {
       int errno_val = errno;
-      notice ("%s: warning: can't rename file `%s' to `%s': %s\n",
+      notice ("%s: warning: can't rename file '%s' to '%s': %s\n",
              pname, shortpath (NULL, filename),
              shortpath (NULL, new_filename), xstrerror (errno_val));
       errors++;
@@ -2451,7 +2451,7 @@ find_extern_def (const def_dec_info *head, const def_dec_info *user)
          {
            extern_def_p = dd_p;        /* save a pointer to the definition */
            if (!quiet_flag)
-             notice ("%s: warning: using formals list from %s(%d) for function `%s'\n",
+             notice ("%s: warning: using formals list from %s(%d) for function '%s'\n",
                      pname,
                      shortpath (NULL, dd_p->file->hash_entry->symbol),
                      dd_p->line, dd_p->hash_entry->symbol);
@@ -2491,13 +2491,13 @@ find_extern_def (const def_dec_info *head, const def_dec_info *user)
                *p++ = '?';
                strcpy (p, ");");
 
-               notice ("%s: %d: `%s' used but missing from SYSCALLS\n",
+               notice ("%s: %d: '%s' used but missing from SYSCALLS\n",
                        shortpath (NULL, file), user->line,
                        needed+7);      /* Don't print "extern " */
              }
 #if 0
            else
-             notice ("%s: %d: warning: no extern definition for `%s'\n",
+             notice ("%s: %d: warning: no extern definition for '%s'\n",
                      shortpath (NULL, file), user->line,
                      user->hash_entry->symbol);
 #endif
@@ -2527,13 +2527,13 @@ find_static_definition (const def_dec_info *user)
   if (num_static_defs == 0)
     {
       if (!quiet_flag)
-       notice ("%s: warning: no static definition for `%s' in file `%s'\n",
+       notice ("%s: warning: no static definition for '%s' in file '%s'\n",
                pname, head->hash_entry->symbol,
                shortpath (NULL, user->file->hash_entry->symbol));
     }
   else if (num_static_defs > 1)
     {
-      notice ("%s: multiple static defs of `%s' in file `%s'\n",
+      notice ("%s: multiple static defs of '%s' in file '%s'\n",
              pname, head->hash_entry->symbol,
              shortpath (NULL, user->file->hash_entry->symbol));
       return NULL;
@@ -2917,7 +2917,7 @@ edit_fn_declaration (const def_dec_info *def_dec_p,
   if (setjmp (source_confusion_recovery))
     {
       restore_pointers ();
-      notice ("%s: declaration of function `%s' not converted\n",
+      notice ("%s: declaration of function '%s' not converted\n",
              pname, function_to_edit);
       return;
     }
@@ -3040,7 +3040,7 @@ edit_fn_declaration (const def_dec_info *def_dec_p,
       else
        {
          if (!quiet_flag)
-           notice ("%s: warning: too many parameter lists in declaration of `%s'\n",
+           notice ("%s: warning: too many parameter lists in declaration of '%s'\n",
                    pname, def_dec_p->hash_entry->symbol);
          check_source (0, end_formals);  /* leave the declaration intact */
        }
@@ -3061,7 +3061,7 @@ edit_fn_declaration (const def_dec_info *def_dec_p,
            if (this_f_list_chain_item)
              {
                if (!quiet_flag)
-                 notice ("\n%s: warning: too few parameter lists in declaration of `%s'\n",
+                 notice ("\n%s: warning: too few parameter lists in declaration of '%s'\n",
                          pname, def_dec_p->hash_entry->symbol);
                check_source (0, start_formals); /* leave the decl intact */
              }
@@ -3157,7 +3157,7 @@ edit_formals_lists (const char *end_formals, unsigned int f_list_count,
       if (func_name_len != strlen (expected)
          || strncmp (func_name_start, expected, func_name_len))
        {
-         notice ("%s: %d: warning: found `%s' but expected `%s'\n",
+         notice ("%s: %d: warning: found '%s' but expected '%s'\n",
                  shortpath (NULL, def_dec_p->file->hash_entry->symbol),
                  identify_lineno (func_name_start),
                  dupnstr (func_name_start, func_name_len),
@@ -3332,7 +3332,7 @@ add_local_decl (const def_dec_info *def_dec_p, const char *clean_text_p)
   if (setjmp (source_confusion_recovery))
     {
       restore_pointers ();
-      notice ("%s: local declaration for function `%s' not inserted\n",
+      notice ("%s: local declaration for function '%s' not inserted\n",
              pname, function_to_edit);
       return;
     }
@@ -3359,7 +3359,7 @@ add_local_decl (const def_dec_info *def_dec_p, const char *clean_text_p)
   if (*start_of_block != '{')
     {
       if (!quiet_flag)
-       notice ("\n%s: %d: warning: can't add declaration of `%s' into macro call\n",
+       notice ("\n%s: %d: warning: can't add declaration of '%s' into macro call\n",
          def_dec_p->file->hash_entry->symbol, def_dec_p->line,
          def_dec_p->hash_entry->symbol);
       return;
@@ -3431,7 +3431,7 @@ add_global_decls (const file_info *file_p, const char *clean_text_p)
   if (setjmp (source_confusion_recovery))
     {
       restore_pointers ();
-      notice ("%s: global declarations for file `%s' not inserted\n",
+      notice ("%s: global declarations for file '%s' not inserted\n",
              pname, shortpath (NULL, file_p->hash_entry->symbol));
       return;
     }
@@ -3520,7 +3520,7 @@ edit_fn_definition (const def_dec_info *def_dec_p, const char *clean_text_p)
   if (setjmp (source_confusion_recovery))
     {
       restore_pointers ();
-      notice ("%s: definition of function `%s' not converted\n",
+      notice ("%s: definition of function '%s' not converted\n",
              pname, function_to_edit);
       return;
     }
@@ -3550,7 +3550,7 @@ edit_fn_definition (const def_dec_info *def_dec_p, const char *clean_text_p)
   if (edit_formals_lists (end_formals, def_dec_p->f_list_count, def_dec_p))
     {
       restore_pointers ();
-      notice ("%s: definition of function `%s' not converted\n",
+      notice ("%s: definition of function '%s' not converted\n",
              pname, function_to_edit);
       return;
     }
@@ -3865,7 +3865,7 @@ scan_for_missed_items (const file_info *file_p)
                        goto not_missed;
 
 #if 0
-                   notice ("%s: found definition of `%s' at %s(%d)\n",
+                   notice ("%s: found definition of '%s' at %s(%d)\n",
                            pname,
                            func_name,
                            shortpath (NULL, file_p->hash_entry->symbol),
@@ -3881,7 +3881,7 @@ scan_for_missed_items (const file_info *file_p)
                    /* If we make it here, then we did not know about this
                       function definition.  */
 
-                   notice ("%s: %d: warning: `%s' excluded by preprocessing\n",
+                   notice ("%s: %d: warning: '%s' excluded by preprocessing\n",
                            shortpath (NULL, file_p->hash_entry->symbol),
                            identify_lineno (id_start), func_name);
                    notice ("%s: function definition not converted\n",
@@ -3942,7 +3942,7 @@ edit_file (const hash_table_entry *hp)
          && !in_system_include_dir (convert_filename)
 #endif /* defined (UNPROTOIZE) */
          )
-       notice ("%s: `%s' not converted\n",
+       notice ("%s: '%s' not converted\n",
                pname, shortpath (NULL, convert_filename));
       return;
     }
@@ -3950,10 +3950,10 @@ edit_file (const hash_table_entry *hp)
   /* Let the user know what we are up to.  */
 
   if (nochange_flag)
-    notice ("%s: would convert file `%s'\n",
+    notice ("%s: would convert file '%s'\n",
            pname, shortpath (NULL, convert_filename));
   else
-    notice ("%s: converting file `%s'\n",
+    notice ("%s: converting file '%s'\n",
            pname, shortpath (NULL, convert_filename));
   fflush (stderr);
 
@@ -3963,7 +3963,7 @@ edit_file (const hash_table_entry *hp)
   if (stat (convert_filename, &stat_buf) == -1)
     {
       int errno_val = errno;
-      notice ("%s: can't get status for file `%s': %s\n",
+      notice ("%s: can't get status for file '%s': %s\n",
              pname, shortpath (NULL, convert_filename),
              xstrerror (errno_val));
       return;
@@ -4005,7 +4005,7 @@ edit_file (const hash_table_entry *hp)
     if ((input_file = open (convert_filename, fd_flags, 0444)) == -1)
       {
        int errno_val = errno;
-       notice ("%s: can't open file `%s' for reading: %s\n",
+       notice ("%s: can't open file '%s' for reading: %s\n",
                pname, shortpath (NULL, convert_filename),
                xstrerror (errno_val));
        return;
@@ -4020,7 +4020,7 @@ edit_file (const hash_table_entry *hp)
       {
        int errno_val = errno;
        close (input_file);
-       notice ("\n%s: error reading input file `%s': %s\n",
+       notice ("\n%s: error reading input file '%s': %s\n",
                pname, shortpath (NULL, convert_filename),
                xstrerror (errno_val));
        return;
@@ -4054,7 +4054,7 @@ edit_file (const hash_table_entry *hp)
     if ((clean_file = creat (clean_filename, 0666)) == -1)
       {
        int errno_val = errno;
-       notice ("%s: can't create/open clean file `%s': %s\n",
+       notice ("%s: can't create/open clean file '%s': %s\n",
                pname, shortpath (NULL, clean_filename),
                xstrerror (errno_val));
        return;
@@ -4159,7 +4159,7 @@ edit_file (const hash_table_entry *hp)
       if (access (new_filename, F_OK) == 0)
        {
          if (!quiet_flag)
-           notice ("%s: warning: file `%s' already saved in `%s'\n",
+           notice ("%s: warning: file '%s' already saved in '%s'\n",
                    pname,
                    shortpath (NULL, convert_filename),
                    shortpath (NULL, new_filename));
@@ -4167,7 +4167,7 @@ edit_file (const hash_table_entry *hp)
       else if (rename (convert_filename, new_filename) == -1)
        {
          int errno_val = errno;
-         notice ("%s: can't link file `%s' to `%s': %s\n",
+         notice ("%s: can't link file '%s' to '%s': %s\n",
                  pname,
                  shortpath (NULL, convert_filename),
                  shortpath (NULL, new_filename),
@@ -4182,7 +4182,7 @@ edit_file (const hash_table_entry *hp)
       /* The file may have already been renamed.  */
       if (errno_val != ENOENT)
        {
-         notice ("%s: can't delete file `%s': %s\n",
+         notice ("%s: can't delete file '%s': %s\n",
                  pname, shortpath (NULL, convert_filename),
                  xstrerror (errno_val));
          return;
@@ -4197,7 +4197,7 @@ edit_file (const hash_table_entry *hp)
     if ((output_file = creat (convert_filename, 0666)) == -1)
       {
        int errno_val = errno;
-       notice ("%s: can't create/open output file `%s': %s\n",
+       notice ("%s: can't create/open output file '%s': %s\n",
                pname, shortpath (NULL, convert_filename),
                xstrerror (errno_val));
        return;
@@ -4230,7 +4230,7 @@ edit_file (const hash_table_entry *hp)
   if (chmod (convert_filename, stat_buf.st_mode) == -1)
     {
       int errno_val = errno;
-      notice ("%s: can't change mode of file `%s': %s\n",
+      notice ("%s: can't change mode of file '%s': %s\n",
              pname, shortpath (NULL, convert_filename),
              xstrerror (errno_val));
     }
index b13753863a44e52ecca234320a2edf16e9f89df5..c09f76e48a402372c983900fa393b9646a553e2e 100644 (file)
@@ -759,7 +759,7 @@ check_asm_stack_operands (rtx insn)
          if (operands_match_p (recog_data.operand[j], recog_data.operand[i]))
            {
              error_for_asm (insn,
-                            "output operand %d must use `&' constraint", j);
+                            "output operand %d must use %<&%> constraint", j);
              malformed_asm = 1;
            }
       }
index 05075dd015aafc27d364e3e15ed79613794da731..8dbde144c19422e1e559297b81dfed2edd04b079 100644 (file)
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -469,7 +469,7 @@ rtl_check_failed_bounds (rtx r, int n, const char *file, int line,
                         const char *func)
 {
   internal_error
-    ("RTL check: access of elt %d of `%s' with last elt %d in %s, at %s:%d",
+    ("RTL check: access of elt %d of '%s' with last elt %d in %s, at %s:%d",
      n, GET_RTX_NAME (GET_CODE (r)), GET_RTX_LENGTH (GET_CODE (r)) - 1,
      func, trim_filename (file), line);
 }
@@ -498,7 +498,7 @@ void
 rtl_check_failed_code1 (rtx r, enum rtx_code code, const char *file,
                        int line, const char *func)
 {
-  internal_error ("RTL check: expected code `%s', have `%s' in %s, at %s:%d",
+  internal_error ("RTL check: expected code '%s', have '%s' in %s, at %s:%d",
                  GET_RTX_NAME (code), GET_RTX_NAME (GET_CODE (r)), func,
                  trim_filename (file), line);
 }
@@ -508,7 +508,7 @@ rtl_check_failed_code2 (rtx r, enum rtx_code code1, enum rtx_code code2,
                        const char *file, int line, const char *func)
 {
   internal_error
-    ("RTL check: expected code `%s' or `%s', have `%s' in %s, at %s:%d",
+    ("RTL check: expected code '%s' or '%s', have '%s' in %s, at %s:%d",
      GET_RTX_NAME (code1), GET_RTX_NAME (code2), GET_RTX_NAME (GET_CODE (r)),
      func, trim_filename (file), line);
 }
@@ -530,7 +530,7 @@ rtl_check_failed_flag (const char *name, rtx r, const char *file,
                       int line, const char *func)
 {
   internal_error
-    ("RTL flag check: %s used with unexpected rtx code `%s' in %s, at %s:%d",
+    ("RTL flag check: %s used with unexpected rtx code '%s' in %s, at %s:%d",
      name, GET_RTX_NAME (GET_CODE (r)), func, trim_filename (file), line);
 }
 #endif /* ENABLE_RTL_FLAG_CHECKING */
index 2f176e9d860c159d1b31e4105f4a02df158ecf42..c87ed688da6819cdb7365a5f5027b11c2fda527f 100644 (file)
@@ -1,3 +1,7 @@
+2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
+
+       * gcc.dg/builtin-prefetch-1.c: Adjust expected messages.
+
 2004-11-08  Steve Ellcey  <sje@cup.hp.com>
 
        * testsuite/gcc.dg/uninit-H.c: Add ifdefs for __hppa__ and __ia64__.
index 4e30275fde5c94da7100d3fb4d8f165da6108500..f3429eed260adf536337de65974eb84b3b09310f 100644 (file)
@@ -28,12 +28,12 @@ good (int *p)
 void
 bad (int *p)
 {
-  __builtin_prefetch (p, -1, 0);  /* { dg-warning "invalid second arg to __builtin_prefetch; using zero" } */
-  __builtin_prefetch (p, 2, 0);   /* { dg-warning "invalid second arg to __builtin_prefetch; using zero" } */
-  __builtin_prefetch (p, bogus, 0);   /* { dg-warning "invalid second arg to __builtin_prefetch; using zero" } */
-  __builtin_prefetch (p, 0, -1);  /* { dg-warning "invalid third arg to __builtin_prefetch; using zero" } */
-  __builtin_prefetch (p, 0, 4);   /* { dg-warning "invalid third arg to __builtin_prefetch; using zero" } */
-  __builtin_prefetch (p, 0, bogus);   /* { dg-warning "invalid third arg to __builtin_prefetch; using zero" } */
+  __builtin_prefetch (p, -1, 0);  /* { dg-warning "invalid second arg to '__builtin_prefetch'; using zero" } */
+  __builtin_prefetch (p, 2, 0);   /* { dg-warning "invalid second arg to '__builtin_prefetch'; using zero" } */
+  __builtin_prefetch (p, bogus, 0);   /* { dg-warning "invalid second arg to '__builtin_prefetch'; using zero" } */
+  __builtin_prefetch (p, 0, -1);  /* { dg-warning "invalid third arg to '__builtin_prefetch'; using zero" } */
+  __builtin_prefetch (p, 0, 4);   /* { dg-warning "invalid third arg to '__builtin_prefetch'; using zero" } */
+  __builtin_prefetch (p, 0, bogus);   /* { dg-warning "invalid third arg to '__builtin_prefetch'; using zero" } */
 }
 
 int
index de82e240cc859e605eca9ef8213ecc541fa84948..f09a8652880622ff897d4c11ad4cf78635cd8db0 100644 (file)
@@ -472,7 +472,7 @@ recompile_files (void)
 
       if (!f->args)
        {
-         error ("repository file `%s' does not contain command-line "
+         error ("repository file '%s' does not contain command-line "
                 "arguments", f->key);
          return 0;
        }
@@ -693,7 +693,7 @@ scan_linker_output (const char *fname)
 
       if (sym && sym->tweaked)
        {
-         error ("`%s' was assigned to `%s', but was not defined "
+         error ("'%s' was assigned to '%s', but was not defined "
                 "during recompilation, or vice versa", 
                 sym->key, sym->file->key);
          fclose (stream);