git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Jeff King <peff@peff.net>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
	"René Scharfe" <l.s.r@web.de>, "Todd Zullinger" <tmz@pobox.com>,
	"John Paul Adrian Glaubitz" <glaubitz@physik.fu-berlin.de>,
	git <git@vger.kernel.org>,
	"Derrick Stolee" <derrickstolee@github.com>
Subject: Re: Testsuite failure on s390x and sparc64 after 6840fe9ee2
Date: Tue, 1 Apr 2025 13:43:37 +0200	[thread overview]
Message-ID: <Z-vRQ-FNv7WD02hl@pks.im> (raw)
In-Reply-To: <20250401031030.GB1087913@coredump.intra.peff.net>

On Mon, Mar 31, 2025 at 11:10:30PM -0400, Jeff King wrote:
> On Mon, Mar 31, 2025 at 10:33:58PM -0400, Jeff King wrote:
> 
> > That would be nice. I think we've discussed type safety for
> > parse-options before, but IIRC none of the solutions were very
> > satisfying. But this sounds like a relatively low-effort approach that
> > buys us something, at least. I wonder if it could even be extended to
> > use __builtin_types_compatible() on platforms that support it.
> 
> So here's a slightly fancier version that uses the gcc builtin when it's
> available:

Thanks for these! I'd also like to spin this even further: right now we
don't really care about the precision of the underlying integer types at
all. While we could force all users to the same type via your mechanism,
I think that'd ultimately be quite awkward. Another way would be to use
one macro per underlying integer type, but that would quickly explode in
scope.

I'll instead try to extend the parse-options interface so that we track
the precision of the underlying integer and then produce an error when
the parsed integer exceeds that precision.

I'll send a patch series later this week.

Patrick

  reply	other threads:[~2025-04-01 11:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-26 20:42 Testsuite failure on s390x and sparc64 after 6840fe9ee2 John Paul Adrian Glaubitz
2025-03-26 22:27 ` Todd Zullinger
2025-03-28  9:29   ` Patrick Steinhardt
2025-03-28  9:30     ` Patrick Steinhardt
2025-03-28  9:38     ` John Paul Adrian Glaubitz
2025-03-28 14:08       ` Todd Zullinger
2025-03-28 15:37         ` Todd Zullinger
2025-03-31 12:27           ` Patrick Steinhardt
2025-03-31 15:48             ` Todd Zullinger
2025-03-31 18:17             ` SZEDER Gábor
2025-04-01  2:33               ` Jeff King
2025-04-01  3:10                 ` Jeff King
2025-04-01 11:43                   ` Patrick Steinhardt [this message]
2025-04-01 15:04                     ` Patrick Steinhardt

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=Z-vRQ-FNv7WD02hl@pks.im \
    --to=ps@pks.im \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=l.s.r@web.de \
    --cc=peff@peff.net \
    --cc=szeder.dev@gmail.com \
    --cc=tmz@pobox.com \
    /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).