+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.
+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.
break;
case OPT_gant:
- warning ("`-gnat' misspelled as `-gant'");
+ warning ("%<-gnat%> misspelled as %<-gant%>");
/* ... fall through ... */
/* 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;
}
/* 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;
}
if (value != const1_rtx)
{
- error ("__builtin_longjmp second argument must be 1");
+ error ("%<__builtin_longjmp%> second argument must be 1");
return const0_rtx;
}
if (mode == VOIDmode)
{
- error ("unknown machine mode %<%s%>", p);
+ error ("unknown machine mode %qs", p);
return NULL_TREE;
}
}
if (!valid_mode)
{
- error ("unable to emulate %<%s%>", p);
+ error ("unable to emulate %qs", p);
return NULL_TREE;
}
if (!targetm.valid_pointer_mode (mode))
{
- error ("invalid pointer mode %<%s%>", p);
+ error ("invalid pointer mode %qs", p);
return NULL_TREE;
}
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;
}
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,
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;
}
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;
}
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). */
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;
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;
}
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
|| 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. */
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; )
{
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);
}
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;
/* 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)
{
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)
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)
{
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)
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)
{
/* 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')
/* If we do not have an `ldd', complain. */
if (ldd_file_name == 0)
{
- error ("cannot find `ldd'");
+ error ("cannot find 'ldd'");
return;
}
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)
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);
}
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)
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
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)
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. */
}
else
{
- warning ("bad value `%s' for -mmemory-latency", alpha_mlat_string);
+ warning ("bad value %qs for -mmemory-latency", alpha_mlat_string);
lat = 3;
}
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;
}
{
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;
}
{
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;
}
{
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;
}
}
}
else
{
- warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
}
}
}
}
else
{
- warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
}
{
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;
}
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 ();
{
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;
}
{
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
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;
{
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;
{
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
{
- warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
}
else
{
- warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
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);
&& 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;
}
if (TARGET_64BIT)
{
- warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
&& 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;
}
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;
}
return;
}
default:
- output_operand_lossage ("invalid operand code `%c'", code);
+ output_operand_lossage ("invalid operand code '%c'", code);
}
}
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;
}
|| ((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;
}
{
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;
}
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;
}
}
else
{
- warning ("invalid argument of `%s' attribute",
+ warning ("invalid argument of %qs attribute",
IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
break;
default:
- warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
*no_add_attrs = true;
break;
}
}
else
{
- warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
}
{
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;
}
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]);
&& 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;
}
}
else
{
- warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
&& 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;
}
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);
}
{
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;
}
{ "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") }, \
|| (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);
}
}
else
{
- warning ("`%s' attribute only applies to functions",
+ warning ("%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
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
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))
&& 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;
}
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]);
}
}
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);
}
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');
}
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');
}
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
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;
}
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;
*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);
&& 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;
}
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)
{
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;
}
{
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;
}
{
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;
}
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");
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))
| (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;
}
{
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;
}
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
}
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;
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;
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;
{
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;
}
&& 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)
{
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;
}
+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,
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
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. */
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);
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;
}
/* 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
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);
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. */
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));
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);
}
}
}
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;
}
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);
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);
/* 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. */
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))
{
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:
}
default:
- sorry ("use of `%s' in template",
+ sorry ("use of %qs in template",
tree_code_name [(int) TREE_CODE (t)]);
return error_mark_node;
}
/* 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
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;
}
{
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;
}
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;
}
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;
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);
(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))
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
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);
&& 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);
}
else if (strchr (arginfo, '*') != 0)
{
- error ("incomplete `%s' option", option_map[j].name);
+ error ("incomplete '%s' option", option_map[j].name);
break;
}
{
if (i + 1 == argc)
{
- error ("missing argument to `%s' option",
+ error ("missing argument to '%s' option",
option_map[j].name);
break;
}
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;
}
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)
{
argv += 2;
}
else
- fatal ("`-%c' option must have argument", opt);
+ fatal ("'-%c' option must have argument", opt);
if (opt == 'V')
new_version = arg;
else
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,
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++;
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++;
{
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];
{
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;
{
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':
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
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
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)
}
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)
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
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;
/* 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);
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;
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. */
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
}
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
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. */
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,
if (*q == '\0')
{
invalid_matches:
- fatal ("multilib spec `%s' is invalid", multilib_matches);
+ fatal ("multilib spec '%s' is invalid", multilib_matches);
}
q++;
}
if (*p == '\0')
{
invalid_exclusions:
- fatal ("multilib exclusions `%s' is invalid",
+ fatal ("multilib exclusions '%s' is invalid",
multilib_exclusions);
}
if (*p == '\0')
{
invalid_select:
- fatal ("multilib select `%s' is invalid",
+ fatal ("multilib select '%s' is invalid",
multilib_select);
}
++p;
if (*p == '\0')
{
invalid_select:
- fatal ("multilib select `%s' is invalid", multilib_select);
+ fatal ("multilib select '%s' is invalid", multilib_select);
}
++p;
if (*e == '\0')
{
invalid_exclusion:
- fatal ("multilib exclusion `%s' is invalid",
+ fatal ("multilib exclusion '%s' is invalid",
multilib_exclusions);
}
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);
}
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 ();
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
{
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 ();
fn_n = NULL;
else
{
- fnotice (stderr, "%s:unknown function `%u'\n",
+ fnotice (stderr, "%s:unknown function '%u'\n",
da_file_name, ident);
break;
}
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;
}
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
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
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;
}
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",
}
}
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. */
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);
+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
objc_implementation_context = NULL_TREE;
}
else
- warning ("`@end' must appear in an @implementation context");
+ warning ("%<@end%> must appear in an @implementation context");
}
void
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;
}
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)));
}
}
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)));
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));
}
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));
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,
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
{
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;
}
#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);
}
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);
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;
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)
static void
error_with_ivar (const char *message, tree decl)
{
- error ("%J%s `%s'", decl,
+ error ("%J%s %qs", decl,
message, gen_declaration (decl));
}
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)));
{
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;
}
= 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));
}
}
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'. */
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));
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));
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;
}
}
if (!p)
{
- error ("cannot find protocol declaration for `%s'",
+ error ("cannot find protocol declaration for %qs",
IDENTIFIER_POINTER (protoname));
return error_mark_node;
}
/* If still not found, print out a warning. */
if (!hsh)
{
- warning ("undeclared selector `%s'", IDENTIFIER_POINTER (selname));
+ warning ("undeclared selector %qs", IDENTIFIER_POINTER (selname));
}
}
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 */
}
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)));
}
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)));
}
#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;
|| 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;
}
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;
/* 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
{
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;
}
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;
}
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;
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%>");
}
}
{
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)));
}
{
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)));
}
}
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)));
}
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;
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;
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);
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;
}
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);
}
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)
{
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
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);
}
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);
}
}
else
{
- warning ("duplicate declaration for protocol `%s'",
+ warning ("duplicate declaration for protocol %qs",
IDENTIFIER_POINTER (name));
}
return protocol;
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));
}
/* 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;
}
{
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;
}
/* 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;
{
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';
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__)
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;
}
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;
}
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;
}
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;
}
{
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);
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]);
{
{
if (is_syscalls)
{
- notice ("%s: warning: missing SYSCALLS file `%s'\n",
+ notice ("%s: warning: missing SYSCALLS file '%s'\n",
pname, aux_info_filename);
return;
}
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++;
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++;
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++;
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++;
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;
(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);
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);
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));
}
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;
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++;
{
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);
*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
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;
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;
}
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 */
}
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 */
}
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),
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;
}
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;
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;
}
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;
}
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;
}
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),
/* 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",
&& !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;
}
/* 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);
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;
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;
{
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;
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;
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));
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),
/* 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;
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;
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));
}
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;
}
}
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);
}
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);
}
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);
}
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 */
+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__.
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
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;
}
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);