On Thu, Jun 19, 2025 at 01:38:06PM +0200, Rainer Orth wrote:
> --- a/gcc/cobol/genapi.cc
> +++ b/gcc/cobol/genapi.cc
> @@ -957,7 +957,7 @@ parser_compile_ecs( const std::vector<ui
>      {
>      SHOW_PARSE_HEADER
>      char ach[64];
> -    snprintf(ach, sizeof(ach), " Size is %ld; retval is %p",
> +    snprintf(ach, sizeof(ach), " Size is %zu; retval is %p",
>               ecs.size(), as_voidp(retval));
>      SHOW_PARSE_TEXT(ach)
>      SHOW_PARSE_END

Please don't add %zu/%zd uses in *printf family functions, not
all hosts support that unfortunately (I think HPUX among others).

There are HOST_SIZE_T_PRINT_UNSIGNED etc. macros in hwint.h and
fmt_size_t type the argument should be cast to (in most cases it is
actually same type as size_t, but not in all).

        Jakub

Reply via email to