Hi Jonathan,

> On Thu, 31 Jul 2025, 22:44 Jonathan Wakely, <jwakely....@gmail.com> wrote:
>
>>
>>
>> On Thu, 31 Jul 2025, 22:23 James K. Lowden, <jklow...@cobolworx.com>
>> wrote:
>>
>>> I want to understand what our baseline is wrt %z in diagnostic
>>> messages.  The proximate cause is this change on July 11 for 32-bit
>>> Darwin to gcc/cobol/parse.y:
>>>
>>>    error_msg(loc, "FUNCTION %qs has "
>>> -            "inconsistent parameter type %zu (%qs)",
>>> -            keyword_str($1), p - args.data(), name_of(p->field) );
>>>
>>
>> This code is just wrong. %zu expects size_t but the argument is ptrdiff_t
>>
>
> You could cast the argument to size_t to make it correct, or cast it to
> some other known type such as long, and then use the corresponding
> specifier such was %ld, which seems to be what the change did.

this was all described in excruciating detail in the patch submission

        https://gcc.gnu.org/pipermail/gcc-patches/2025-June/687385.html

and the commit message.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to