+2004-09-15 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * attribs.c, builtins.c, c-format.c, c-pch.c, coverage.c,
+ except.c, fold-const.c, function.c, langhooks.c, params.c,
+ reload.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c,
+ tree-dump.c, tree-mudflap.c, tree.c, varasm.c: Use %<, %> and %q
+ for quoting in diagnostics going through pretty-print.c. Use ''
+ for quoting in other diagnostic text.
+ * langhooks.c: Include intl.h. Mark text locating diagnostics for
+ translation.
+ * Makefile.in (langhooks.o): Update dependencies.
+ * pretty-print.h (pp_printf): Mark as accepting GCC diagnostic
+ formats.
+
2004-09-15 Mark Mitchell <mark@codesourcery.com>
* configure.ac: Check for COMDAT support. Robustify check for
langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) toplev.h \
tree-inline.h $(RTL_H) insn-config.h $(INTEGRATE_H) langhooks.h \
- $(LANGHOOKS_DEF_H) $(FLAGS_H) $(GGC_H) diagnostic.h
+ $(LANGHOOKS_DEF_H) $(FLAGS_H) $(GGC_H) diagnostic.h intl.h
tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(FLAGS_H) function.h $(PARAMS_H) \
toplev.h $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h \
if (spec == NULL)
{
- warning ("`%s' attribute directive ignored",
+ warning ("%qs attribute directive ignored",
IDENTIFIER_POINTER (name));
continue;
}
|| (spec->max_length >= 0
&& list_length (args) > spec->max_length))
{
- error ("wrong number of arguments specified for `%s' attribute",
+ error ("wrong number of arguments specified for %qs attribute",
IDENTIFIER_POINTER (name));
continue;
}
}
else
{
- warning ("`%s' attribute does not apply to types",
+ warning ("%qs attribute does not apply to types",
IDENTIFIER_POINTER (name));
continue;
}
if (TREE_CODE (*anode) != FUNCTION_TYPE
&& TREE_CODE (*anode) != METHOD_TYPE)
{
- warning ("`%s' attribute only applies to function types",
+ warning ("%qs attribute only applies to function types",
IDENTIFIER_POINTER (name));
continue;
}
/* Argument 1 (read/write flag) must be a compile-time constant int. */
if (TREE_CODE (arg1) != INTEGER_CST)
{
- error ("second arg to `__builtin_prefetch' must be a constant");
+ error ("second arg to %<__builtin_prefetch%> must be a constant");
arg1 = integer_zero_node;
}
op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0);
/* Argument 2 (locality) must be a compile-time constant int. */
if (TREE_CODE (arg2) != INTEGER_CST)
{
- error ("third arg to `__builtin_prefetch' must be a constant");
+ error ("third arg to %<__builtin_prefetch%> must be a constant");
arg2 = integer_zero_node;
}
op2 = expand_expr (arg2, NULL_RTX, VOIDmode, 0);
if (arglist != 0)
{
if (!host_integerp (TREE_VALUE (arglist), 0))
- error ("argument of `__builtin_args_info' must be constant");
+ error ("argument of %<__builtin_args_info%> must be constant");
else
{
HOST_WIDE_INT wordnum = tree_low_cst (TREE_VALUE (arglist), 0);
if (wordnum < 0 || wordnum >= nwords)
- error ("argument of `__builtin_args_info' out of range");
+ error ("argument of %<__builtin_args_info%> out of range");
else
return GEN_INT (word_ptr[wordnum]);
}
}
else
- error ("missing argument in `__builtin_args_info'");
+ error ("missing argument in %<__builtin_args_info%>");
return const0_rtx;
}
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
== void_type_node))
{
- error ("`va_start' used in function with fixed args");
+ error ("%<va_start%> used in function with fixed args");
return const0_rtx;
}
|| TREE_CODE (arg) == INDIRECT_REF)
arg = TREE_OPERAND (arg, 0);
if (arg != last_parm)
- warning ("second parameter of `va_start' not last named argument");
+ warning ("second parameter of %<va_start%> not last named argument");
}
else
/* Evidently an out of date version of <stdarg.h>; can't validate
va_start's second argument, but can still work as intended. */
- warning ("`__builtin_next_arg' called without an argument");
+ warning ("%<__builtin_next_arg%> called without an argument");
return expand_binop (Pmode, add_optab,
current_function_internal_arg_pointer,
chain = TREE_CHAIN (arglist);
if (TREE_CHAIN (chain))
- error ("too many arguments to function `va_start'");
+ error ("too many arguments to function %<va_start%>");
nextarg = expand_builtin_next_arg (chain);
valist = stabilize_va_list (TREE_VALUE (arglist), 1);
if (TYPE_MAIN_VARIANT (want_va_type) != TYPE_MAIN_VARIANT (have_va_type))
{
- error ("first argument to `va_arg' not of type `va_list'");
+ error ("first argument to %<va_arg%> not of type %<va_list%>");
return GS_ERROR;
}
/* Unfortunately, this is merely undefined, rather than a constraint
violation, so we cannot make this an error. If this call is never
executed, the program is still strictly conforming. */
- warning ("`%T' is promoted to `%T' when passed through `...'",
+ warning ("%qT is promoted to %qT when passed through %<...%>",
type, promoted_type);
if (! gave_help)
{
gave_help = true;
- warning ("(so you should pass `%T' not `%T' to `va_arg')",
+ warning ("(so you should pass %qT not %qT to %<va_arg%>)",
promoted_type, type);
}
else if (! host_integerp (TREE_VALUE (arglist), 1))
{
if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_FRAME_ADDRESS)
- error ("invalid arg to `__builtin_frame_address'");
+ error ("invalid arg to %<__builtin_frame_address%>");
else
- error ("invalid arg to `__builtin_return_address'");
+ error ("invalid arg to %<__builtin_return_address%>");
return const0_rtx;
}
else
if (tem == NULL)
{
if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_FRAME_ADDRESS)
- warning ("unsupported arg to `__builtin_frame_address'");
+ warning ("unsupported arg to %<__builtin_frame_address%>");
else
- warning ("unsupported arg to `__builtin_return_address'");
+ warning ("unsupported arg to %<__builtin_return_address%>");
return const0_rtx;
}
if (TREE_CODE (c) != INTEGER_CST)
{
- error ("second arg to `__builtin_expect' must be a constant");
+ error ("second arg to %<__builtin_expect%> must be a constant");
c = integer_zero_node;
}
/* Check that we have exactly one argument. */
if (arglist == 0)
{
- error ("too few arguments to function `%s'",
+ error ("too few arguments to function %qs",
IDENTIFIER_POINTER (DECL_NAME (fndecl)));
return error_mark_node;
}
else if (TREE_CHAIN (arglist) != 0)
{
- error ("too many arguments to function `%s'",
+ error ("too many arguments to function %qs",
IDENTIFIER_POINTER (DECL_NAME (fndecl)));
return error_mark_node;
}
else
{
- error ("non-floating-point argument to function `%s'",
+ error ("non-floating-point argument to function %qs",
IDENTIFIER_POINTER (DECL_NAME (fndecl)));
return error_mark_node;
}
/* Check that we have exactly two arguments. */
if (arglist == 0 || TREE_CHAIN (arglist) == 0)
{
- error ("too few arguments to function `%s'",
+ error ("too few arguments to function %qs",
IDENTIFIER_POINTER (DECL_NAME (fndecl)));
return error_mark_node;
}
else if (TREE_CHAIN (TREE_CHAIN (arglist)) != 0)
{
- error ("too many arguments to function `%s'",
+ error ("too many arguments to function %qs",
IDENTIFIER_POINTER (DECL_NAME (fndecl)));
return error_mark_node;
}
cmp_type = type1;
else
{
- error ("non-floating-point argument to function `%s'",
+ error ("non-floating-point argument to function %qs",
IDENTIFIER_POINTER (DECL_NAME (fndecl)));
return error_mark_node;
}
tree chain = TREE_CHAIN (arglist);
if (TREE_CHAIN (chain))
- error ("too many arguments to function `va_start'");
+ error ("too many arguments to function %<va_start%>");
simplify_builtin_next_arg (chain);
}
if (TYPE_ARG_TYPES (fntype) == 0
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
== void_type_node))
- error ("`va_start' used in function with fixed args");
+ error ("%<va_start%> used in function with fixed args");
else if (arglist)
{
tree last_parm = tree_last (DECL_ARGUMENTS (current_function_decl));
|| TREE_CODE (arg) == INDIRECT_REF)
arg = TREE_OPERAND (arg, 0);
if (arg != last_parm)
- warning ("second parameter of `va_start' not last named argument");
+ warning ("second parameter of %<va_start%> not last named argument");
TREE_VALUE (arglist) = arg;
}
else
/* Evidently an out of date version of <stdarg.h>; can't validate
va_start's second argument, but can still work as intended. */
- warning ("`__builtin_next_arg' called without an argument");
+ warning ("%<__builtin_next_arg%> called without an argument");
}
static const format_flag_spec printf_flag_specs[] =
{
- { ' ', 0, 0, N_("` ' flag"), N_("the ` ' printf flag"), STD_C89 },
- { '+', 0, 0, N_("`+' flag"), N_("the `+' printf flag"), STD_C89 },
- { '#', 0, 0, N_("`#' flag"), N_("the `#' printf flag"), STD_C89 },
- { '0', 0, 0, N_("`0' flag"), N_("the `0' printf flag"), STD_C89 },
- { '-', 0, 0, N_("`-' flag"), N_("the `-' printf flag"), STD_C89 },
- { '\'', 0, 0, N_("`'' flag"), N_("the `'' printf flag"), STD_EXT },
- { 'I', 0, 0, N_("`I' flag"), N_("the `I' printf flag"), STD_EXT },
+ { ' ', 0, 0, N_("' ' flag"), N_("the ' ' printf flag"), STD_C89 },
+ { '+', 0, 0, N_("'+' flag"), N_("the '+' printf flag"), STD_C89 },
+ { '#', 0, 0, N_("'#' flag"), N_("the '#' printf flag"), STD_C89 },
+ { '0', 0, 0, N_("'0' flag"), N_("the '0' printf flag"), STD_C89 },
+ { '-', 0, 0, N_("'-' flag"), N_("the '-' printf flag"), STD_C89 },
+ { '\'', 0, 0, N_("''' flag"), N_("the ''' printf flag"), STD_EXT },
+ { 'I', 0, 0, N_("'I' flag"), N_("the 'I' printf flag"), STD_EXT },
{ 'w', 0, 0, N_("field width"), N_("field width in printf format"), STD_C89 },
{ 'p', 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
static const format_flag_spec asm_fprintf_flag_specs[] =
{
- { ' ', 0, 0, N_("` ' flag"), N_("the ` ' printf flag"), STD_C89 },
- { '+', 0, 0, N_("`+' flag"), N_("the `+' printf flag"), STD_C89 },
- { '#', 0, 0, N_("`#' flag"), N_("the `#' printf flag"), STD_C89 },
- { '0', 0, 0, N_("`0' flag"), N_("the `0' printf flag"), STD_C89 },
- { '-', 0, 0, N_("`-' flag"), N_("the `-' printf flag"), STD_C89 },
+ { ' ', 0, 0, N_("' ' flag"), N_("the ' ' printf flag"), STD_C89 },
+ { '+', 0, 0, N_("'+' flag"), N_("the '+' printf flag"), STD_C89 },
+ { '#', 0, 0, N_("'#' flag"), N_("the '#' printf flag"), STD_C89 },
+ { '0', 0, 0, N_("'0' flag"), N_("the '0' printf flag"), STD_C89 },
+ { '-', 0, 0, N_("'-' flag"), N_("the '-' printf flag"), STD_C89 },
{ 'w', 0, 0, N_("field width"), N_("field width in printf format"), STD_C89 },
{ 'p', 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
static const format_flag_spec gcc_diag_flag_specs[] =
{
- { 'q', 0, 0, N_("`q' flag"), N_("the `q' diagnostic flag"), STD_C89 },
+ { 'q', 0, 0, N_("'q' flag"), N_("the 'q' diagnostic flag"), STD_C89 },
{ 'p', 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
{ 0, 0, 0, NULL, NULL, 0 }
static const format_flag_spec gcc_cxxdiag_flag_specs[] =
{
- { '+', 0, 0, N_("`+' flag"), N_("the `+' printf flag"), STD_C89 },
- { '#', 0, 0, N_("`#' flag"), N_("the `#' printf flag"), STD_C89 },
- { 'q', 0, 0, N_("`q' flag"), N_("the `q' diagnostic flag"), STD_C89 },
+ { '+', 0, 0, N_("'+' flag"), N_("the '+' printf flag"), STD_C89 },
+ { '#', 0, 0, N_("'#' flag"), N_("the '#' printf flag"), STD_C89 },
+ { 'q', 0, 0, N_("'q' flag"), N_("the 'q' diagnostic flag"), STD_C89 },
{ 'p', 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
{ 0, 0, 0, NULL, NULL, 0 }
static const format_flag_spec scanf_flag_specs[] =
{
{ '*', 0, 0, N_("assignment suppression"), N_("the assignment suppression scanf feature"), STD_C89 },
- { 'a', 0, 0, N_("`a' flag"), N_("the `a' scanf flag"), STD_EXT },
+ { 'a', 0, 0, N_("'a' flag"), N_("the 'a' scanf flag"), STD_EXT },
{ 'w', 0, 0, N_("field width"), N_("field width in scanf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in scanf format"), STD_C89 },
- { '\'', 0, 0, N_("`'' flag"), N_("the `'' scanf flag"), STD_EXT },
- { 'I', 0, 0, N_("`I' flag"), N_("the `I' scanf flag"), STD_EXT },
+ { '\'', 0, 0, N_("''' flag"), N_("the ''' scanf flag"), STD_EXT },
+ { 'I', 0, 0, N_("'I' flag"), N_("the 'I' scanf flag"), STD_EXT },
{ 0, 0, 0, NULL, NULL, 0 }
};
static const format_flag_spec strftime_flag_specs[] =
{
- { '_', 0, 0, N_("`_' flag"), N_("the `_' strftime flag"), STD_EXT },
- { '-', 0, 0, N_("`-' flag"), N_("the `-' strftime flag"), STD_EXT },
- { '0', 0, 0, N_("`0' flag"), N_("the `0' strftime flag"), STD_EXT },
- { '^', 0, 0, N_("`^' flag"), N_("the `^' strftime flag"), STD_EXT },
- { '#', 0, 0, N_("`#' flag"), N_("the `#' strftime flag"), STD_EXT },
+ { '_', 0, 0, N_("'_' flag"), N_("the '_' strftime flag"), STD_EXT },
+ { '-', 0, 0, N_("'-' flag"), N_("the '-' strftime flag"), STD_EXT },
+ { '0', 0, 0, N_("'0' flag"), N_("the '0' strftime flag"), STD_EXT },
+ { '^', 0, 0, N_("'^' flag"), N_("the '^' strftime flag"), STD_EXT },
+ { '#', 0, 0, N_("'#' flag"), N_("the '#' strftime flag"), STD_EXT },
{ 'w', 0, 0, N_("field width"), N_("field width in strftime format"), STD_EXT },
- { 'E', 0, 0, N_("`E' modifier"), N_("the `E' strftime modifier"), STD_C99 },
- { 'O', 0, 0, N_("`O' modifier"), N_("the `O' strftime modifier"), STD_C99 },
- { 'O', 'o', 0, NULL, N_("the `O' modifier"), STD_EXT },
+ { 'E', 0, 0, N_("'E' modifier"), N_("the 'E' strftime modifier"), STD_C99 },
+ { 'O', 0, 0, N_("'O' modifier"), N_("the 'O' strftime modifier"), STD_C99 },
+ { 'O', 'o', 0, NULL, N_("the 'O' modifier"), STD_EXT },
{ 0, 0, 0, NULL, NULL, 0 }
};
static const format_flag_spec strfmon_flag_specs[] =
{
{ '=', 0, 1, N_("fill character"), N_("fill character in strfmon format"), STD_C89 },
- { '^', 0, 0, N_("`^' flag"), N_("the `^' strfmon flag"), STD_C89 },
- { '+', 0, 0, N_("`+' flag"), N_("the `+' strfmon flag"), STD_C89 },
- { '(', 0, 0, N_("`(' flag"), N_("the `(' strfmon flag"), STD_C89 },
- { '!', 0, 0, N_("`!' flag"), N_("the `!' strfmon flag"), STD_C89 },
- { '-', 0, 0, N_("`-' flag"), N_("the `-' strfmon flag"), STD_C89 },
+ { '^', 0, 0, N_("'^' flag"), N_("the '^' strfmon flag"), STD_C89 },
+ { '+', 0, 0, N_("'+' flag"), N_("the '+' strfmon flag"), STD_C89 },
+ { '(', 0, 0, N_("'(' flag"), N_("the '(' strfmon flag"), STD_C89 },
+ { '!', 0, 0, N_("'!' flag"), N_("the '!' strfmon flag"), STD_C89 },
+ { '-', 0, 0, N_("'-' flag"), N_("the '-' strfmon flag"), STD_C89 },
{ 'w', 0, 0, N_("field width"), N_("field width in strfmon format"), STD_C89 },
{ '#', 0, 0, N_("left precision"), N_("left precision in strfmon format"), STD_C89 },
{ 'p', 0, 0, N_("right precision"), N_("right precision in strfmon format"), STD_C89 },
/* These will require a "tree" at runtime. */
{ "ADEFJTV",0,STD_C89,{ T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+#", "", NULL },
- /* These accept either an `int' or an `enum tree_code' (which is handled as an `int'.) */
+ /* These accept either an 'int' or an 'enum tree_code' (which is handled as an 'int'.) */
{ "CLOPQ",0,STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "<>'", 0, STD_C89, NOARGUMENTS, "", "", NULL },
if (format_chars[1] == 's' || format_chars[1] == 'S'
|| format_chars[1] == '[')
{
- /* `a' is used as a flag. */
+ /* 'a' is used as a flag. */
i = strlen (flag_chars);
flag_chars[i++] = 'a';
flag_chars[i] = 0;
/* Check the type of the "real" argument, if there's a type we want. */
if (wanted_type == cur_type)
continue;
- /* If we want `void *', allow any pointer type.
+ /* If we want 'void *', allow any pointer type.
(Anything else would already have got a warning.)
With -pedantic, only allow pointers to void and to character
types. */
unsigned int i;
/* For the GCC-diagnostics custom format specifiers to work, one
- must have declared `tree' and/or `location_t' prior to using
+ must have declared 'tree' and/or 'location_t' prior to using
those attributes. If we haven't seen these declarations then
you shouldn't use the specifiers requiring these types.
However we don't force a hard ICE because we may see only one
if ((loc = maybe_get_identifier ("location_t")))
loc = TREE_TYPE (identifier_global_value (loc));
- /* We need to grab the underlying `union tree_node' so peek into
+ /* We need to grab the underlying 'union tree_node' so peek into
an extra type level. */
if ((t = maybe_get_identifier ("tree")))
t = TREE_TYPE (TREE_TYPE (identifier_global_value (t)));
if (info.format_type == asm_fprintf_format_type)
init_dynamic_asm_fprintf_info();
/* If this is one of the diagnostic attributes, then we have to
- initialize `location_t' and `tree' at runtime. */
+ initialize 'location_t' and 'tree' at runtime. */
else if (info.format_type == gcc_diag_format_type
|| info.format_type == gcc_cdiag_format_type
|| info.format_type == gcc_cxxdiag_format_type)
/* The driver always provides a valid -o option. */
if (asm_file_name == NULL
|| strcmp (asm_file_name, "-") == 0)
- fatal_error ("`%s' is not a valid output file", asm_file_name);
+ fatal_error ("%qs is not a valid output file", asm_file_name);
asm_file_startpos = ftell (asm_out_file);
{
if (cpp_get_options (pfile)->warn_invalid_pch)
cpp_error (pfile, CPP_DL_WARNING,
- "%s: created on host `%.*s', but used on host `%s'", name,
+ "%s: created on host '%.*s', but used on host '%s'", name,
v.host_machine_length, short_strings, host_machine);
return 2;
}
{
if (cpp_get_options (pfile)->warn_invalid_pch)
cpp_error (pfile, CPP_DL_WARNING,
- "%s: created for target `%.*s', but used for target `%s'",
+ "%s: created for target '%.*s', but used for target '%s'",
name, v.target_machine_length,
short_strings + v.host_machine_length, target_machine);
return 2;
{
if (cpp_get_options (pfile)->warn_invalid_pch)
cpp_error (pfile, CPP_DL_WARNING,
- "%s: created by version `%.*s', but this is version `%s'",
+ "%s: created by version '%.*s', but this is version '%s'",
name, v.version_length,
(short_strings + v.host_machine_length
+ v.target_machine_length),
if (!gcov_magic (gcov_read_unsigned (), GCOV_DATA_MAGIC))
{
- warning ("`%s' is not a gcov data file", da_file_name);
+ warning ("%qs is not a gcov data file", da_file_name);
gcov_close ();
return;
}
GCOV_UNSIGNED2STRING (v, tag);
GCOV_UNSIGNED2STRING (e, GCOV_VERSION);
- warning ("`%s' is version `%.*s', expected version `%.*s'",
+ warning ("%qs is version %q.*s, expected version %q.*s",
da_file_name, 4, v, 4, e);
gcov_close ();
return;
gcov_sync (offset, length);
if ((is_error = gcov_is_error ()))
{
- error (is_error < 0 ? "`%s' has overflowed" : "`%s' is corrupted",
+ error (is_error < 0 ? "%qs has overflowed" : "%qs is corrupted",
da_file_name);
htab_delete (counts_hash);
break;
entry = htab_find (counts_hash, &elt);
if (!entry)
{
- warning ("no coverage for function '%s' found.", IDENTIFIER_POINTER
+ warning ("no coverage for function %qs found.", IDENTIFIER_POINTER
(DECL_ASSEMBLER_NAME (current_function_decl)));
return 0;
}
checksum = compute_checksum ();
if (entry->checksum != checksum)
{
- error ("coverage mismatch for function '%s' while reading counter '%s'.",
+ error ("coverage mismatch for function %qs while reading counter %qs.",
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl)),
ctr_names[counter]);
error ("checksum is %x instead of %x", entry->checksum, checksum);
}
else if (entry->summary.num != expected)
{
- error ("coverage mismatch for function '%s' while reading counter '%s'.",
+ error ("coverage mismatch for function %qs while reading counter %qs.",
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl)),
ctr_names[counter]);
error ("number of counters is %d instead of %d", entry->summary.num, expected);
if (bbg_file_opened > 1 && gcov_is_error ())
{
- warning ("error writing `%s'", bbg_file_name);
+ warning ("error writing %qs", bbg_file_name);
bbg_file_opened = -1;
}
if (TREE_CODE (which) != INTEGER_CST)
{
- error ("argument of `__builtin_eh_return_regno' must be constant");
+ error ("argument of %<__builtin_eh_return_regno%> must be constant");
return constm1_rtx;
}
{
if (wanted_code == NE_EXPR)
{
- warning ("`or' of unmatched not-equal tests is always 1");
+ warning ("%<or%> of unmatched not-equal tests is always 1");
return constant_boolean_node (true, truth_type);
}
else
{
- warning ("`and' of mutually exclusive equal-tests is always 0");
+ warning ("%<and%> of mutually exclusive equal-tests is always 0");
return constant_boolean_node (false, truth_type);
}
}
if (decl && size == -1
&& TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST)
{
- error ("%Jsize of variable '%D' is too large", decl, decl);
+ error ("%Jsize of variable %qD is too large", decl, decl);
size = 1;
}
instantiate_virtual_regs_lossage (rtx insn)
{
gcc_assert (asm_noperands (PATTERN (insn)) >= 0);
- error_for_asm (insn, "impossible constraint in `asm'");
+ error_for_asm (insn, "impossible constraint in %<asm%>");
delete_insn (insn);
}
/* Given a pointer to a piece of rtx and an optional pointer to the
&& DECL_RTL_SET_P (decl)
&& REG_P (DECL_RTL (decl))
&& regno_clobbered_at_setjmp (REGNO (DECL_RTL (decl))))
- warning ("%Jvariable '%D' might be clobbered by `longjmp' or `vfork'",
+ warning ("%Jvariable %qD might be clobbered by %<longjmp%>"
+ " or %<vfork%>",
decl, decl);
}
if (DECL_RTL (decl) != 0
&& REG_P (DECL_RTL (decl))
&& regno_clobbered_at_setjmp (REGNO (DECL_RTL (decl))))
- warning ("%Jargument '%D' might be clobbered by `longjmp' or `vfork'",
+ warning ("%Jargument %qD might be clobbered by %<longjmp%> or %<vfork%>",
decl, decl);
}
decl; decl = TREE_CHAIN (decl))
if (!TREE_USED (decl) && TREE_CODE (decl) == PARM_DECL
&& DECL_NAME (decl) && !DECL_ARTIFICIAL (decl))
- warning ("%Junused parameter '%D'", decl, decl);
+ warning ("%Junused parameter %qD", decl, decl);
}
static GTY(()) rtx initial_trampoline;
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "intl.h"
#include "tm.h"
#include "toplev.h"
#include "tree.h"
pp_set_prefix (context->printer, new_prefix);
if (current_function_decl == NULL)
- pp_printf (context->printer, "At top level:");
+ pp_printf (context->printer, _("At top level:"));
else
{
if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE)
pp_printf
- (context->printer, "In member function `%s':",
+ (context->printer, _("In member function %qs:"),
lang_hooks.decl_printable_name (current_function_decl, 2));
else
pp_printf
- (context->printer, "In function `%s':",
+ (context->printer, _("In function %qs:"),
lang_hooks.decl_printable_name (current_function_decl, 2));
}
}
/* If we didn't find this parameter, issue an error message. */
- error ("invalid parameter `%s'", name);
+ error ("invalid parameter %qs", name);
}
extern const char *pp_base_last_position_in_text (const pretty_printer *);
extern void pp_base_emit_prefix (pretty_printer *);
extern void pp_base_append_text (pretty_printer *, const char *, const char *);
-extern void pp_printf (pretty_printer *, const char *, ...) ATTRIBUTE_PRINTF_2;
+
+/* This header may be included before toplev.h, hence the duplicate
+ definitions to allow for GCC-specific formats. */
+#if GCC_VERSION >= 3005
+#define ATTRIBUTE_GCC_PPDIAG(m, n) __attribute__ ((__format__ (__gcc_diag__, m ,n))) ATTRIBUTE_NONNULL(m)
+#else
+#define ATTRIBUTE_GCC_PPDIAG(m, n) ATTRIBUTE_NONNULL(m)
+#endif
+extern void pp_printf (pretty_printer *, const char *, ...)
+ ATTRIBUTE_GCC_PPDIAG(2,3);
+
extern void pp_verbatim (pretty_printer *, const char *, ...);
extern void pp_base_flush (pretty_printer *);
extern void pp_base_format_text (pretty_printer *, text_info *);
mode = outmode;
if (mode == VOIDmode)
{
- error_for_asm (this_insn, "cannot reload integer constant operand in `asm'");
+ error_for_asm (this_insn, "cannot reload integer constant "
+ "operand in %<asm%>");
mode = word_mode;
if (in != 0)
inmode = word_mode;
}
if (i == FIRST_PSEUDO_REGISTER)
{
- error_for_asm (this_insn, "impossible register constraint in `asm'");
+ error_for_asm (this_insn, "impossible register constraint "
+ "in %<asm%>");
class = ALL_REGS;
}
}
this_alternative_earlyclobber[i] = 0;
gcc_assert (this_insn_is_asm);
error_for_asm (this_insn,
- "`&' constraint used with no register class");
+ "%<&%> constraint used with no register class");
}
for (j = 0; j < noperands; j++)
/* No alternative works with reloads?? */
if (insn_code_number >= 0)
fatal_insn ("unable to generate reloads for:", insn);
- error_for_asm (insn, "inconsistent operand constraints in an `asm'");
+ error_for_asm (insn, "inconsistent operand constraints in an %<asm%>");
/* Avoid further trouble with this insn. */
PATTERN (insn) = gen_rtx_USE (VOIDmode, const0_rtx);
n_reloads = 0;
else
{
gcc_assert (insn_code_number < 0);
- error_for_asm (insn, "inconsistent operand constraints in an `asm'");
+ error_for_asm (insn, "inconsistent operand constraints "
+ "in an %<asm%>");
/* Avoid further trouble with this insn. */
PATTERN (insn) = gen_rtx_USE (VOIDmode, const0_rtx);
n_reloads = 0;
{
static const char *const reg_class_names[] = REG_CLASS_NAMES;
if (asm_noperands (PATTERN (insn)) >= 0)
- error_for_asm (insn, "can't find a register in class `%s' while reloading `asm'",
+ error_for_asm (insn, "can't find a register in class %qs while "
+ "reloading %<asm%>",
reg_class_names[class]);
else
{
- error ("unable to find a register to spill in class `%s'",
+ error ("unable to find a register to spill in class %qs",
reg_class_names[class]);
fatal_insn ("this is the insn:", insn);
}
|| (extract_insn (p), ! constrain_operands (1))))
{
error_for_asm (insn,
- "`asm' operand requires impossible reload");
+ "%<asm%> operand requires "
+ "impossible reload");
delete_insn (p);
}
}
/* It's the user's fault; the operand's mode and constraint
don't match. Disable this reload so we don't crash in final. */
error_for_asm (insn,
- "`asm' operand constraint incompatible with operand size");
+ "%<asm%> operand constraint incompatible with operand size");
rld[r].in = 0;
rld[r].out = 0;
rld[r].reg_rtx = 0;
if (asm_noperands (PATTERN (insn)) < 0)
/* It's the compiler's fault. */
fatal_insn ("VOIDmode on an output", insn);
- error_for_asm (insn, "output operand is constant in `asm'");
+ error_for_asm (insn, "output operand is constant in %<asm%>");
/* Prevent crash--use something we know is valid. */
mode = word_mode;
old = gen_rtx_REG (mode, REGNO (reloadreg));
message. */
if (!p)
{
- error ("output operand constraint lacks `='");
+ error ("output operand constraint lacks %<=%>");
return false;
}
size_t c_len = strlen (constraint);
if (p != constraint)
- warning ("output constraint `%c' for operand %d is not at the beginning",
+ warning ("output constraint %qc for operand %d "
+ "is not at the beginning",
*p, operand_num);
/* Make a copy of the constraint. */
{
case '+':
case '=':
- error ("operand constraint contains incorrectly positioned '+' or '='");
+ error ("operand constraint contains incorrectly positioned "
+ "%<+%> or %<=%>");
return false;
case '%':
if (operand_num + 1 == ninputs + noutputs)
{
- error ("`%%' constraint used with last operand");
+ error ("%<%%%> constraint used with last operand");
return false;
}
break;
case '+': case '=': case '&':
if (constraint == orig_constraint)
{
- error ("input operand constraint contains `%c'", constraint[j]);
+ error ("input operand constraint contains %qc", constraint[j]);
return false;
}
break;
if (constraint == orig_constraint
&& input_num + 1 == ninputs - ninout)
{
- error ("`%%' constraint used with last operand");
+ error ("%<%%%> constraint used with last operand");
return false;
}
break;
default:
if (! ISALPHA (constraint[j]))
{
- error ("invalid punctuation `%c' in constraint", constraint[j]);
+ error ("invalid punctuation %qc in constraint", constraint[j]);
return false;
}
if (REG_CLASS_FROM_CONSTRAINT (constraint[j], constraint + j)
regno++)
if (TEST_HARD_REG_BIT (clobbered_regs, regno))
{
- error ("asm-specifier for variable `%s' conflicts with asm clobber list",
+ error ("asm-specifier for variable %qs conflicts with "
+ "asm clobber list",
IDENTIFIER_POINTER (DECL_NAME (decl)));
/* Reset registerness to stop multiple errors emitted for a
if (i >= 0 || i == -4)
++nclobbers;
else if (i == -2)
- error ("unknown register name `%s' in `asm'", regname);
+ error ("unknown register name %qs in %<asm%>", regname);
/* Mark clobbered registers. */
if (i >= 0)
/* Clobbering the PIC register is an error */
if (i == (int) PIC_OFFSET_TABLE_REGNUM)
{
- error ("PIC register `%s' clobbered in `asm'", regname);
+ error ("PIC register %qs clobbered in %<asm%>", regname);
return;
}
ninputs += ninout;
if (ninputs + noutputs > MAX_RECOG_OPERANDS)
{
- error ("more than %d operands in `asm'", MAX_RECOG_OPERANDS);
+ error ("more than %d operands in %<asm%>", MAX_RECOG_OPERANDS);
return;
}
if (allows_reg)
op = force_reg (TYPE_MODE (type), op);
else if (!allows_mem)
- warning ("asm operand %d probably doesn't match constraints",
+ warning ("asm operand %d probably doesn%'t match constraints",
i + noutputs);
else if (MEM_P (op))
{
if (nalternatives + 1 > MAX_RECOG_ALTERNATIVES)
{
- error ("too many alternatives in `asm'");
+ error ("too many alternatives in %<asm%>");
return false;
}
if (n_occurrences (',', constraint) != nalternatives)
{
- error ("operand constraints for `asm' differ in number of alternatives");
+ error ("operand constraints for %<asm%> differ "
+ "in number of alternatives");
return false;
}
return true;
failure:
- error ("duplicate asm operand name '%s'",
+ error ("duplicate asm operand name %qs",
TREE_STRING_POINTER (TREE_PURPOSE (TREE_PURPOSE (i))));
return false;
}
}
*q = '\0';
- error ("undefined named operand '%s'", p + 1);
+ error ("undefined named operand %qs", p + 1);
op = 0;
found:
if (lang_hooks.decls.global_bindings_p ())
{
if (TREE_CONSTANT (size))
- error ("type size can't be explicitly evaluated");
+ error ("type size can%'t be explicitly evaluated");
else
error ("variable-size type declared outside of any function");
int size_as_int = TREE_INT_CST_LOW (size);
if (compare_tree_int (size, size_as_int) == 0)
- warning ("%Jsize of '%D' is %d bytes", decl, decl, size_as_int);
+ warning ("%Jsize of %qD is %d bytes", decl, decl, size_as_int);
else
- warning ("%Jsize of '%D' is larger than %d bytes",
+ warning ("%Jsize of %qD is larger than %d bytes",
decl, decl, larger_than_size);
}
}
{
if (STRICT_ALIGNMENT)
warning ("%Jpacked attribute causes inefficient alignment "
- "for '%D'", field, field);
+ "for %qD", field, field);
else
- warning ("%Jpacked attribute is unnecessary for '%D'",
+ warning ("%Jpacked attribute is unnecessary for %qD",
field, field);
}
}
Bump the cumulative size to multiple of field alignment. */
if (warn_padded)
- warning ("%Jpadding struct to align '%D'", field, field);
+ warning ("%Jpadding struct to align %qD", field, field);
/* If the alignment is still within offset_align, just align
the bit position. */
name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (rli->t)));
if (STRICT_ALIGNMENT)
- warning ("packed attribute causes inefficient alignment for `%s'", name);
+ warning ("packed attribute causes inefficient "
+ "alignment for %qs", name);
else
- warning ("packed attribute is unnecessary for `%s'", name);
+ warning ("packed attribute is unnecessary for %qs", name);
}
else
{
+2004-09-15 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * g++.dg/ext/member-attr.C, g++.dg/warn/deprecated.C,
+ gcc.dg/deprecated.c, gcc.dg/noreturn-1.c, gcc.dg/noreturn-4.c:
+ Update expected messages.
+
2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/16485
class T {
public:
- __attribute__ ((garbage1)) void member1(int) {} /* { dg-error "`garbage1' attribute directive ignored" "" } */
- void __attribute__ ((garbage2)) member2(int) {} /* { dg-error "`garbage2' attribute directive ignored" "" } */
+ __attribute__ ((garbage1)) void member1(int) {} /* { dg-error "'garbage1' attribute directive ignored" "" } */
+ void __attribute__ ((garbage2)) member2(int) {} /* { dg-error "'garbage2' attribute directive ignored" "" } */
};
typedef int INT1 __attribute__((deprecated));
typedef INT1 INT2 __attribute__ ((__deprecated__));
-typedef INT1 INT1a; /* { dg-warning "`INT1' is deprecated" "" } */
+typedef INT1 INT1a; /* { dg-warning "'INT1' is deprecated" "" } */
typedef INT1 INT1b __attribute__ ((deprecated));
-INT1 should_be_unavailable; /* { dg-warning "`INT1' is deprecated" "" } */
+INT1 should_be_unavailable; /* { dg-warning "'INT1' is deprecated" "" } */
INT1a should_not_be_deprecated;
INT1 f1(void) __attribute__ ((deprecated));
-INT1 f2(void) { return 0; } /* { dg-warning "`INT1' is deprecated" "" } */
+INT1 f2(void) { return 0; } /* { dg-warning "'INT1' is deprecated" "" } */
INT2 f3(void) __attribute__ ((__deprecated__));
-INT2 f4(void) { return 0; } /* { dg-warning "`INT2' is deprecated" "" } */
-int f5(INT2 x); /* { dg-warning "`INT2' is deprecated" "" } */
+INT2 f4(void) { return 0; } /* { dg-warning "'INT2' is deprecated" "" } */
+int f5(INT2 x); /* { dg-warning "'INT2' is deprecated" "" } */
int f6(INT2 x) __attribute__ ((__deprecated__));
typedef enum Color {red, green, blue} Color __attribute__((deprecated));
int g1;
int g2 __attribute__ ((deprecated));
int g3 __attribute__ ((__deprecated__));
-Color k; /* { dg-warning "`Color' is deprecated" "" } */
+Color k; /* { dg-warning "'Color' is deprecated" "" } */
typedef struct {
int field1;
int func1()
{
- INT1 w; /* { dg-warning "`INT1' is deprecated" "" } */
+ INT1 w; /* { dg-warning "'INT1' is deprecated" "" } */
int x __attribute__ ((deprecated));
int y __attribute__ ((__deprecated__));
int z;
- int (*pf)() = f1; /* { dg-warning "`f1' is deprecated" "" } */
+ int (*pf)() = f1; /* { dg-warning "'f1' is deprecated" "" } */
- z = w + x + y + g1 + g2 + g3; /* { dg-warning "`x' is deprecated" "" } */
- /* { dg-warning "`y' is deprecated" "" { target *-*-* } 55 } */
- /* { dg-warning "`g2' is deprecated" "" { target *-*-* } 55 } */
- /* { dg-warning "`g3' is deprecated" "" { target *-*-* } 55 } */
- return f1(); /* { dg-warning "`f1' is deprecated" "" } */
+ z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated" "" } */
+ /* { dg-warning "'y' is deprecated" "" { target *-*-* } 55 } */
+ /* { dg-warning "'g2' is deprecated" "" { target *-*-* } 55 } */
+ /* { dg-warning "'g3' is deprecated" "" { target *-*-* } 55 } */
+ return f1(); /* { dg-warning "'f1' is deprecated" "" } */
}
int func2(S1 *p)
S1 lp;
if (p->field1)
- return p->field2; /* { dg-warning "`field2' is deprecated" "" } */
- else if (lp.field4) /* { dg-warning "`field4' is deprecated" "" } */
+ return p->field2; /* { dg-warning "'field2' is deprecated" "" } */
+ else if (lp.field4) /* { dg-warning "'field4' is deprecated" "" } */
return p->field3;
p->u1.field5 = g1 + p->field7;
- p->u2.field9; /* { dg-warning "`u2' is deprecated" "" } */
- return p->u1.field6 + p->field8; /* { dg-warning "`field6' is deprecated" "" } */
- /* { dg-warning "`field8' is deprecated" "" { target *-*-* } 73 } */
+ p->u2.field9; /* { dg-warning "'u2' is deprecated" "" } */
+ return p->u1.field6 + p->field8; /* { dg-warning "'field6' is deprecated" "" } */
+ /* { dg-warning "'field8' is deprecated" "" { target *-*-* } 73 } */
}
struct SS1 {
int x;
- INT1 y; /* { dg-warning "`INT1' is deprecated" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated" "" } */
} __attribute__ ((deprecated));
-struct SS1 *p1; /* { dg-warning "`SS1' is deprecated" "" } */
+struct SS1 *p1; /* { dg-warning "'SS1' is deprecated" "" } */
struct __attribute__ ((__deprecated__)) SS2 {
int x;
- INT1 y; /* { dg-warning "`INT1' is deprecated" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated" "" } */
};
-struct SS2 *p2; /* { dg-warning "`SS2' is deprecated" "" } */
+struct SS2 *p2; /* { dg-warning "'SS2' is deprecated" "" } */
#endif
#ifdef __cplusplus
class T {
public:
void member1(int) __attribute__ ((deprecated));
- void member2(INT1) __attribute__ ((__deprecated__)); /* { dg-warning "`INT1' is deprecated" "" } */
+ void member2(INT1) __attribute__ ((__deprecated__)); /* { dg-warning "'INT1' is deprecated" "" } */
int member3(T *);
int x;
} __attribute__ ((deprecated));
int T::member3(T *p)
{
- p->member1(1); /* { dg-warning "`member1' is deprecated" "" } */
- (*p).member1(2); /* { dg-warning "`member1' is deprecated" "" } */
- p->member2(1); /* { dg-warning "`member2' is deprecated" "" } */
- (*p).member2(2); /* { dg-warning "`member2' is deprecated" "" } */
+ p->member1(1); /* { dg-warning "'member1' is deprecated" "" } */
+ (*p).member1(2); /* { dg-warning "'member1' is deprecated" "" } */
+ p->member2(1); /* { dg-warning "'member2' is deprecated" "" } */
+ (*p).member2(2); /* { dg-warning "'member2' is deprecated" "" } */
p->member3(p);
(*p).member3(p);
- return f1(); /* { dg-warning "`f1' is deprecated" "" } */
+ return f1(); /* { dg-warning "'f1' is deprecated" "" } */
}
#endif
typedef int INT1 __attribute__((deprecated));
typedef INT1 INT2 __attribute__ ((__deprecated__));
-typedef INT1 INT1a; /* { dg-warning "`INT1' is deprecated" "" } */
+typedef INT1 INT1a; /* { dg-warning "'INT1' is deprecated" "" } */
typedef INT1 INT1b __attribute__ ((deprecated));
-INT1 should_be_unavailable; /* { dg-warning "`INT1' is deprecated" "" } */
+INT1 should_be_unavailable; /* { dg-warning "'INT1' is deprecated" "" } */
INT1a should_not_be_deprecated;
INT1 f1(void) __attribute__ ((deprecated));
-INT1 f2(void) { return 0; } /* { dg-warning "`INT1' is deprecated" "" } */
+INT1 f2(void) { return 0; } /* { dg-warning "'INT1' is deprecated" "" } */
INT2 f3(void) __attribute__ ((__deprecated__));
-INT2 f4(void) { return 0; } /* { dg-warning "`INT2' is deprecated" "" } */
-int f5(INT2 x); /* { dg-warning "`INT2' is deprecated" "" } */
-int f6(INT2 x) __attribute__ ((__deprecated__)); /* { dg-warning "`INT2' is deprecated" "" } */
+INT2 f4(void) { return 0; } /* { dg-warning "'INT2' is deprecated" "" } */
+int f5(INT2 x); /* { dg-warning "'INT2' is deprecated" "" } */
+int f6(INT2 x) __attribute__ ((__deprecated__)); /* { dg-warning "'INT2' is deprecated" "" } */
typedef enum {red, green, blue} Color __attribute__((deprecated));
int g1;
int g2 __attribute__ ((deprecated));
int g3 __attribute__ ((__deprecated__));
-Color k; /* { dg-warning "`Color' is deprecated" "" } */
+Color k; /* { dg-warning "'Color' is deprecated" "" } */
typedef struct {
int field1;
int func1()
{
- INT1 w; /* { dg-warning "`INT1' is deprecated" "" } */
+ INT1 w; /* { dg-warning "'INT1' is deprecated" "" } */
int x __attribute__ ((deprecated));
int y __attribute__ ((__deprecated__));
int z;
- int (*pf)() = f1; /* { dg-warning "`f1' is deprecated" "" } */
+ int (*pf)() = f1; /* { dg-warning "'f1' is deprecated" "" } */
- z = w + x + y + g1 + g2 + g3; /* { dg-warning "`x' is deprecated" "" } */
- /* { dg-warning "`y' is deprecated" "" { target *-*-* } 55 } */
- /* { dg-warning "`g2' is deprecated" "" { target *-*-* } 55 } */
- /* { dg-warning "`g3' is deprecated" "" { target *-*-* } 55 } */
- return f1(); /* { dg-warning "`f1' is deprecated" "" } */
+ z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated" "" } */
+ /* { dg-warning "'y' is deprecated" "" { target *-*-* } 55 } */
+ /* { dg-warning "'g2' is deprecated" "" { target *-*-* } 55 } */
+ /* { dg-warning "'g3' is deprecated" "" { target *-*-* } 55 } */
+ return f1(); /* { dg-warning "'f1' is deprecated" "" } */
}
int func2(S1 *p)
S1 lp;
if (p->field1)
- return p->field2; /* { dg-warning "`field2' is deprecated" "" } */
- else if (lp.field4) /* { dg-warning "`field4' is deprecated" "" } */
+ return p->field2; /* { dg-warning "'field2' is deprecated" "" } */
+ else if (lp.field4) /* { dg-warning "'field4' is deprecated" "" } */
return p->field3;
p->u1.field5 = g1 + p->field7;
- p->u2.field9; /* { dg-warning "`u2' is deprecated" "" } */
- return p->u1.field6 + p->field8; /* { dg-warning "`field6' is deprecated" "" } */
- /* { dg-warning "`field8' is deprecated" "" { target *-*-* } 73 } */
+ p->u2.field9; /* { dg-warning "'u2' is deprecated" "" } */
+ return p->u1.field6 + p->field8; /* { dg-warning "'field6' is deprecated" "" } */
+ /* { dg-warning "'field8' is deprecated" "" { target *-*-* } 73 } */
}
struct SS1 {
int x;
- INT1 y; /* { dg-warning "`INT1' is deprecated" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated" "" } */
} __attribute__ ((deprecated));
-struct SS1 *p1; /* { dg-warning "`SS1' is deprecated" "" } */
+struct SS1 *p1; /* { dg-warning "'SS1' is deprecated" "" } */
struct __attribute__ ((__deprecated__)) SS2 {
int x;
- INT1 y; /* { dg-warning "`INT1' is deprecated" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated" "" } */
};
-struct SS2 *p2; /* { dg-warning "`SS2' is deprecated" "" } */
+struct SS2 *p2; /* { dg-warning "'SS2' is deprecated" "" } */
#endif
#ifdef __cplusplus
int T::member2(T *p)
{
- p->member1(1); /* { xxdg-warning "`member1' is deprecated" "" } */
- (*p).member1(2); /* { xxdg-warning "`member1' is deprecated" "" } */
- p->member2(1); /* { xxdg-warning "`member2' is deprecated" "" } */
- (*p).member2(2); /* { xxdg-warning "`member2' is deprecated" "" } */
+ p->member1(1); /* { xxdg-warning "'member1' is deprecated" "" } */
+ (*p).member1(2); /* { xxdg-warning "'member1' is deprecated" "" } */
+ p->member2(1); /* { xxdg-warning "'member2' is deprecated" "" } */
+ (*p).member2(2); /* { xxdg-warning "'member2' is deprecated" "" } */
p->member3(p);
(*p).member3(p);
- return f1(); /* { xxdg-warning "`f1' is deprecated" "" } */
+ return f1(); /* { xxdg-warning "'f1' is deprecated" "" } */
}
#endif
void
foo1(void)
{
-} /* { dg-warning "`noreturn' function does return" "detect falling off end of noreturn" } */
+} /* { dg-warning "'noreturn' function does return" "detect falling off end of noreturn" } */
extern void foo2(void) __attribute__ ((__noreturn__));
void
extern void foo4(void);
void
foo4(void)
-{ /* { dg-warning "candidate for attribute `noreturn'" "detect noreturn candidate" } */
+{ /* { dg-warning "candidate for attribute 'noreturn'" "detect noreturn candidate" } */
exit(0);
}
foo8(void)
{
foo7();
-} /* { dg-warning "`noreturn' function does return" "detect return from tail call" } */
+} /* { dg-warning "'noreturn' function does return" "detect return from tail call" } */
int
main (void)
-{ /* { dg-warning "warning: function might be possible candidate for attribute `noreturn'" "warn for main" } */
+{ /* { dg-warning "warning: function might be possible candidate for attribute 'noreturn'" "warn for main" } */
exit (0);
}
if (*endp != 0)
{
if (pname != 0)
- error ("invalid option argument `%s'", pname);
+ error ("invalid option argument %qs", pname);
return defval;
}
|| TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))))
{
if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
- pedwarn ("%J'%F' used but never defined", decl, decl);
+ pedwarn ("%J%qF used but never defined", decl, decl);
else
- warning ("%J'%F' declared `static' but never defined", decl, decl);
+ warning ("%J%qF declared %<static%> but never defined",
+ decl, decl);
/* This symbol is effectively an "extern" declaration now. */
TREE_PUBLIC (decl) = 1;
assemble_external (decl);
&& ! (TREE_CODE (decl) == VAR_DECL && DECL_REGISTER (decl))
/* Otherwise, ask the language. */
&& lang_hooks.decls.warn_unused_global (decl))
- warning ("%J'%D' defined but not used", decl, decl);
+ warning ("%J%qD defined but not used", decl, decl);
/* Avoid confusing the debug information machinery when there are
errors. */
if (DECL_P (node))
{
expanded_location xloc = expand_location (DECL_SOURCE_LOCATION (node));
- warning ("`%s' is deprecated (declared at %s:%d)",
+ warning ("%qs is deprecated (declared at %s:%d)",
IDENTIFIER_POINTER (DECL_NAME (node)),
xloc.file, xloc.line);
}
expanded_location xloc
= expand_location (DECL_SOURCE_LOCATION (decl));
if (what)
- warning ("`%s' is deprecated (declared at %s:%d)", what,
+ warning ("%qs is deprecated (declared at %s:%d)", what,
xloc.file, xloc.line);
else
warning ("type is deprecated (declared at %s:%d)",
else
{
if (what)
- warning ("`%s' is deprecated", what);
+ warning ("%qs is deprecated", what);
else
warning ("type is deprecated");
}
#endif
if (!valid_target_option)
- error ("invalid option `%s'", name);
+ error ("invalid option %qs", name);
}
/* Print version information to FILE.
else
asm_out_file = fopen (asm_file_name, "w+b");
if (asm_out_file == 0)
- fatal_error ("can't open %s for writing: %m", asm_file_name);
+ fatal_error ("can%'t open %s for writing: %m", asm_file_name);
}
#ifdef IO_BUFFER_SIZE
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");
{
aux_info_file = fopen (aux_info_file_name, "w");
if (aux_info_file == 0)
- fatal_error ("can't open %s: %m", aux_info_file_name);
+ fatal_error ("can%'t open %s: %m", aux_info_file_name);
}
if (! targetm.have_named_sections)
{
if (!tree_could_throw_p (stmt))
{
- error ("Statement marked for throw, but doesn't.");
+ error ("Statement marked for throw, but doesn%'t.");
goto fail;
}
if (!last_in_block && tree_can_throw_internal (stmt))
if (!has_label_p (true_edge->dest,
GOTO_DESTINATION (COND_EXPR_THEN (stmt))))
{
- error ("`then' label does not match edge at end of bb %d\n",
+ error ("%<then%> label does not match edge at end of bb %d\n",
bb->index);
err = 1;
}
if (!has_label_p (false_edge->dest,
GOTO_DESTINATION (COND_EXPR_ELSE (stmt))))
{
- error ("`else' label does not match edge at end of bb %d\n",
+ error ("%<else%> label does not match edge at end of bb %d\n",
bb->index);
err = 1;
}
&& !TREE_THIS_VOLATILE (cfun->decl)
&& EXIT_BLOCK_PTR->pred == NULL
&& !lang_hooks.function.missing_noreturn_ok_p (cfun->decl))
- warning ("%Jfunction might be possible candidate for attribute `noreturn'",
+ warning ("%Jfunction might be possible candidate for "
+ "attribute %<noreturn%>",
cfun->decl);
/* If we have a path to EXIT, then we do return. */
#ifdef USE_MAPPED_LOCATION
if (location == UNKNOWN_LOCATION)
location = cfun->function_end_locus;
- warning ("%H`noreturn' function does return", &location);
+ warning ("%H%<noreturn%> function does return", &location);
#else
if (!locus)
locus = &cfun->function_end_locus;
- warning ("%H`noreturn' function does return", locus);
+ warning ("%H%<noreturn%> function does return", locus);
#endif
}
dfi = get_dump_file_info (phase);
stream = fopen (name, dfi->state < 0 ? "w" : "a");
if (!stream)
- error ("could not open dump file `%s': %s", name, strerror (errno));
+ error ("could not open dump file %qs: %s", name, strerror (errno));
else
dfi->state = 1;
free (name);
flags |= option_ptr->value;
goto found;
}
- warning ("ignoring unknown option `%.*s' in `-fdump-%s'",
+ warning ("ignoring unknown option %q.*s in %<-fdump-%s%>",
length, ptr, dfi->swtch);
found:;
ptr = end_ptr;
for (i = 0; i < VARRAY_ACTIVE_SIZE (deferred_static_decls); i++)
if (VARRAY_TREE (deferred_static_decls, i) == obj)
{
- warning ("mudflap cannot track lifetime of `%s'",
+ warning ("mudflap cannot track lifetime of %qs",
IDENTIFIER_POINTER (DECL_NAME (obj)));
return;
}
}
if (TREE_CODE (node) != RECORD_TYPE && TREE_CODE (node) != UNION_TYPE)
{
- warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
if (TREE_CODE (node) == FUNCTION_DECL && DECL_INITIAL (node)
&& !DECL_DECLARED_INLINE_P (node))
{
- error ("%Jfunction `%D' definition is marked dllimport.", node, node);
+ error ("%Jfunction %qD definition is marked dllimport.", node, node);
*no_add_attrs = true;
}
{
if (DECL_INITIAL (node))
{
- error ("%Jvariable `%D' definition is marked dllimport.",
+ error ("%Jvariable %qD definition is marked dllimport.",
node, node);
*no_add_attrs = true;
}
&& (TREE_CODE (node) == VAR_DECL
|| TREE_CODE (node) == FUNCTION_DECL))
{
- error ("%Jexternal linkage required for symbol '%D' because of "
- "'%s' attribute.", node, node, IDENTIFIER_POINTER (name));
+ error ("%Jexternal linkage required for symbol %qD because of "
+ "%qs attribute.", node, node, IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
int line, const char *function)
{
internal_error
- ("tree check: expected class '%c', have '%c' (%s) in %s, at %s:%d",
+ ("tree check: expected class %qc, have %qc (%s) in %s, at %s:%d",
cl, TREE_CODE_CLASS (TREE_CODE (node)),
tree_code_name[TREE_CODE (node)], function, trim_filename (file), line);
}
{
/* First detect errors in declaring global registers. */
if (reg_number == -1)
- error ("%Jregister name not specified for '%D'", decl, decl);
+ error ("%Jregister name not specified for %qD", decl, decl);
else if (reg_number < 0)
- error ("%Jinvalid register name for '%D'", decl, decl);
+ error ("%Jinvalid register name for %qD", decl, decl);
else if (TYPE_MODE (TREE_TYPE (decl)) == BLKmode)
- error ("%Jdata type of '%D' isn't suitable for a register",
+ error ("%Jdata type of %qD isn%'t suitable for a register",
decl, decl);
else if (! HARD_REGNO_MODE_OK (reg_number, TYPE_MODE (TREE_TYPE (decl))))
- error ("%Jregister specified for '%D' isn't suitable for data type",
+ error ("%Jregister specified for %qD isn%'t suitable for data type",
decl, decl);
/* Now handle properly declared static register variables. */
else
error ("global register variable has initial value");
}
if (TREE_THIS_VOLATILE (decl))
- warning ("volatile register variables don't work as you might wish");
+ warning ("volatile register variables don%'t "
+ "work as you might wish");
/* If the user specified one of the eliminables registers here,
e.g., FRAME_POINTER_REGNUM, we don't want to get this variable
Also handle vars declared register invalidly. */
if (name[0] == '*' && (reg_number >= 0 || reg_number == -3))
- error ("%Jregister name given for non-register variable '%D'", decl, decl);
+ error ("%Jregister name given for non-register variable %qD", decl, decl);
/* Specifying a section attribute on a variable forces it into a
non-.bss section, and thus it cannot be common. */
if (!dont_output_data && DECL_SIZE (decl) == 0)
{
- error ("%Jstorage size of `%D' isn't known", decl, decl);
+ error ("%Jstorage size of %qD isn%'t known", decl, decl);
TREE_ASM_WRITTEN (decl) = 1;
return;
}
if (! dont_output_data
&& ! host_integerp (DECL_SIZE_UNIT (decl), 1))
{
- error ("%Jsize of variable '%D' is too large", decl, decl);
+ error ("%Jsize of variable %qD is too large", decl, decl);
return;
}
In particular, a.out format supports a maximum alignment of 4. */
if (align > MAX_OFILE_ALIGNMENT)
{
- warning ("%Jalignment of '%D' is greater than maximum object "
+ warning ("%Jalignment of %qD is greater than maximum object "
"file alignment. Using %d", decl, decl,
MAX_OFILE_ALIGNMENT/BITS_PER_UNIT);
align = MAX_OFILE_ALIGNMENT;
#if !defined(ASM_OUTPUT_ALIGNED_COMMON) && !defined(ASM_OUTPUT_ALIGNED_DECL_COMMON) && !defined(ASM_OUTPUT_ALIGNED_BSS)
if ((unsigned HOST_WIDE_INT) DECL_ALIGN_UNIT (decl) > rounded)
- warning ("%Jrequested alignment for '%D' is greater than "
+ warning ("%Jrequested alignment for %qD is greater than "
"implemented alignment of %d", decl, decl, rounded);
#endif
total_bytes += fieldsize;
}
else if (val != 0 && TREE_CODE (val) != INTEGER_CST)
- error ("invalid initial value for member `%s'",
+ error ("invalid initial value for member %qs",
IDENTIFIER_POINTER (DECL_NAME (field)));
else
{
declare_weak because the NEWDECL and OLDDECL was not yet
been merged; therefore, TREE_ASM_WRITTEN was not set. */
if (TREE_ASM_WRITTEN (olddecl))
- error ("%Jweak declaration of '%D' must precede definition",
+ error ("%Jweak declaration of %qD must precede definition",
newdecl, newdecl);
/* If we've already generated rtl referencing OLDDECL, we may
a weak symbol. */
else if (TREE_USED (olddecl)
&& TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (olddecl)))
- warning ("%Jweak declaration of '%D' after first use results "
+ warning ("%Jweak declaration of %qD after first use results "
"in unspecified behavior", newdecl, newdecl);
if (SUPPORTS_WEAK)
declare_weak (tree decl)
{
if (! TREE_PUBLIC (decl))
- error ("%Jweak declaration of '%D' must be public", decl, decl);
+ error ("%Jweak declaration of %qD must be public", decl, decl);
else if (TREE_CODE (decl) == FUNCTION_DECL && TREE_ASM_WRITTEN (decl))
- error ("%Jweak declaration of '%D' must precede definition", decl, decl);
+ error ("%Jweak declaration of %qD must precede definition", decl, decl);
else if (SUPPORTS_WEAK)
{
if (! DECL_WEAK (decl))
weak_decls = tree_cons (NULL, decl, weak_decls);
}
else
- warning ("%Jweak declaration of '%D' not supported", decl, decl);
+ warning ("%Jweak declaration of %qD not supported", decl, decl);
mark_weak (decl);
}
+2004-09-15 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * testsuite/libmudflap.c/pass35-frag.c: Update expected message.
+
2004-09-07 Frank Ch. Eigler <fche@redhat.com>
* configure.ac: Look for pwd.h, grp.h, netdb.h headers and functions.
#include <string.h>
extern char end []; /* Any old symbol we're sure will be defined. */
-/* { dg-warning "cannot track lifetime of `end'" "cannot track lifetime" { target *-*-* } 0 } */
+/* { dg-warning "cannot track lifetime of 'end'" "cannot track lifetime" { target *-*-* } 0 } */
int main ()
{