git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Junio C HamanoNext: Sören Krecker
Message 8 of 12 in “[PATCHv2 0/4] Fixes typemissmatch warinigs from msvc”
  1. Sören KreckerJan 6, 2025
  2. 2/4 date.c: Fix type missmatch warings from msvcSören Krecker, Jan 6, 2025
  3. Eric SunshineJan 6, 2025
  4. Andreas SchwabJan 6, 2025
  5. 1/4 add-patch: Fix type missmatch rom msvcSören Krecker, Jan 6, 2025
  6. brian m. carlsonJan 7, 2025
  7. Junio C HamanoJan 7, 2025
  8. Junio C HamanoJan 7, 2025
  9. 4/4 commit.c: Fix type missmatch warings from msvcSören Krecker, Jan 6, 2025
  10. Eric SunshineJan 6, 2025
  11. 3/4 apply.c : Fix type missmatch warings from msvcSören Krecker, Jan 6, 2025
  12. Eric SunshineJan 6, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.