Re: [PATCHv2 1/4] add-patch: Fix type missmatch rom msvc
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 7, 2025, 00:53 UTC
- Message-ID
- <xmqqa5c3wikb.fsf@gitster.g>
- In-Reply-To
- <xmqqed1fwjt9.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 6 quoted lines
>> If we're using size_t, we can use %zu. That's specified in C99 as the >> appropriate formatting type for size_t, and we require C99 or C11 for >> all systems. We don't need to cast to uintmax_t. > > You and Documentation/CodingGuidelines contradict with each other > here.
By this, I do not necessarily mean that we should stick to the past tradition since d7d850e2 (CodingGuidelines: mention C99 features we can't use, 2022-10-10), written back when MSVC was claiming to do C99 without letting us use %z conversion.
What I meant was that if we are to update our stance against %z conversion after re-evaluating the situation (and such time will certainly come someday---I do not offhand know if it can be today), we should update the documentation before or at least at the same time we recommend its use to new people.
Thanks.