]> git.ipfire.org Git - thirdparty/gcc.git/commit
Printf properly on systems without %zu [PR120086]
authorJørgen Kvalsvik <j@lambda.is>
Tue, 6 May 2025 09:38:34 +0000 (11:38 +0200)
committerJørgen Kvalsvik <j@lambda.is>
Fri, 9 May 2025 08:19:44 +0000 (10:19 +0200)
commitdd87540491de7242416751666089fcdbce434e7b
tree1cd4028bc2a48818398c5f7c7165363b051a2a0b
parent61d21863c9cc2e1fe03a4c7231b1119d86243c64
Printf properly on systems without %zu [PR120086]

Some systems don't support the %zu format modifier for size_t, such as
hppa64-hp-hpux. We don't really need the full width of size_t for
printing the number of prime paths as path counts of those sizes
would've already blown up the machine. For printing the vector size we
can use the formatting directives from hwint.h.

PR gcov-profile/120086

gcc/ChangeLog:

* gcov.cc (print_prime_path_lines): Use unsigned, format with
%u.
(print_prime_path_source): Likewise.
(output_path_coverage): Format with HOST_SIZE_T_PRINT_UNSIGNED,
use unsigned for pathno.
gcc/gcov.cc