Skip to content
Snippets Groups Projects
Commit 8427290f authored by Jakub Jelinek's avatar Jakub Jelinek
Browse files

Add %[zt][diox] support to pretty-print

In the previous patch I haven't touched the gcc diagnostic routines,
using HOST_SIZE_T_PRINT* for those is obviously undesirable because we
want the strings to be translatable.  We already have %w[diox] for
HOST_WIDE_INT arguments, this patch adds t and z modifiers for those.

2024-02-10  Jakub Jelinek  <jakub@redhat.com>

gcc/
	* pretty-print.cc (pp_integer_with_precision): Handle precision 3 for
	size_t and precision 4 for ptrdiff_t.  Formatting fix.
	(pp_format): Document %{t,z}{d,i,u,o,x}.  Implement t and z modifiers.
	Formatting fixes.
	(test_pp_format): Test t and z modifiers.
	* gcc.cc (read_specs): Use %td instead of %ld and casts to long.
gcc/c-family/
	* c-format.cc (gcc_diag_length_specs): Add t and z modifiers.
	(PP_FORMAT_CHAR_TABLE, gcc_gfc_char_table): Add entries for t and
	z modifiers.
gcc/fortran/
	* error.cc (error_print): Handle z and t modifiers on d, i and u.
	* check.cc (gfc_check_transfer): Use %zd instead of %ld and casts to
	long.
	* primary.cc (gfc_convert_to_structure_constructor): Use %td instead
	of %ld and casts to long.
parent 89e93ce8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment