%.*s: a substring the length of which is specified by an argument
integer.
%Ns: likewise, but length specified as constant in the format string.
- %H: location_t.
- %J: a decl tree, from which DECL_SOURCE_LOCATION will be recorded.
%K: a statement, from which EXPR_LOCATION and TREE_BLOCK will be recorded.
Flag 'q': quote formatted text (must come immediately after '%').
(pp, *text->args_ptr, precision, unsigned, "x");
break;
- case 'H':
- {
- location_t *locus = va_arg (*text->args_ptr, location_t *);
- gcc_assert (text->locus != NULL);
- *text->locus = *locus;
- }
- break;
-
- case 'J':
- {
- tree t = va_arg (*text->args_ptr, tree);
- gcc_assert (text->locus != NULL);
- *text->locus = DECL_SOURCE_LOCATION (t);
- }
- break;
-
case 'K':
{
tree t = va_arg (*text->args_ptr, tree), block;
pp_line_cutoff (pp) = maximum_length;
pp_prefixing_rule (pp) = DIAGNOSTICS_SHOW_PREFIX_ONCE;
pp_set_prefix (pp, prefix);
+ pp_translate_identifiers (pp) = true;
}
/* Append a string delimited by START and END to the output area of
void
pp_base_tree_identifier (pretty_printer *pp, tree id)
{
- const char *text = identifier_to_locale (IDENTIFIER_POINTER (id));
- pp_append_text (pp, text, text + strlen (text));
+ if (pp_translate_identifiers (pp))
+ {
+ const char *text = identifier_to_locale (IDENTIFIER_POINTER (id));
+ pp_append_text (pp, text, text + strlen (text));
+ }
+ else
+ pp_append_text (pp, IDENTIFIER_POINTER (id),
+ IDENTIFIER_POINTER (id) + IDENTIFIER_LENGTH (id));
}
\f
/* The string starting at P has LEN (at least 1) bytes left; if they