git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: xmqqfrm9t6up.fsf@gitster.g, git@vger.kernel.org,
	phillip.wood123@gmail.com, ps@pks.im,
	"Sören Krecker" <soekkle@freenet.de>
Subject: Re: [PATCHv2 1/4] add-patch: Fix type missmatch rom msvc
Date: Mon, 06 Jan 2025 16:53:24 -0800	[thread overview]
Message-ID: <xmqqa5c3wikb.fsf@gitster.g> (raw)
In-Reply-To: <xmqqed1fwjt9.fsf@gitster.g> (Junio C. Hamano's message of "Mon, 06 Jan 2025 16:26:26 -0800")

Junio C Hamano <gitster@pobox.com> writes:

>> 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.


  reply	other threads:[~2025-01-07  0:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-06 19:08 [PATCHv2 0/4] Fixes typemissmatch warinigs from msvc Sören Krecker
2025-01-06 19:08 ` [PATCHv2 1/4] add-patch: Fix type missmatch rom msvc Sören Krecker
2025-01-07  0:13   ` brian m. carlson
2025-01-07  0:26     ` Junio C Hamano
2025-01-07  0:53       ` Junio C Hamano [this message]
2025-01-06 19:08 ` [PATCHv2 2/4] date.c: Fix type missmatch warings from msvc Sören Krecker
2025-01-06 22:22   ` Eric Sunshine
2025-01-06 22:53     ` Andreas Schwab
2025-01-06 19:08 ` [PATCHv2 3/4] apply.c : " Sören Krecker
2025-01-06 22:26   ` Eric Sunshine
2025-01-06 19:08 ` [PATCHv2 4/4] commit.c: " Sören Krecker
2025-01-06 22:27   ` Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqa5c3wikb.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood123@gmail.com \
    --cc=ps@pks.im \
    --cc=sandals@crustytoothpaste.net \
    --cc=soekkle@freenet.de \
    --cc=xmqqfrm9t6up.fsf@gitster.g \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).