Re: [PATCH] test-progress: fix test failures on big-endian systems
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 23, 2019, 01:58 UTC
- Message-ID
- <xmqqpniojk8z.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20191021184954.GA2526@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> But here's where it gets tricky. In addition to catching any size > mismatches, this will also catch signedness problems. I.e., if we make > OPT_INTEGER() use "intp", then everybody passing in &unsigned_var now > gets a compiler warning. Which maybe is a good thing, I dunno.
Hmph, true. I'd agree with back-burnering it for now.
Perhaps we'd fix the signedness issue one by one in a preparatory series before converting the value field to a union, if we want to pursue this idea further (in which I am mildly interested, by the way), but it does sound like it should be given lower priority.
Show 5 quoted lines
> So that's where I gave up. Converting between signed and unsigned > variables needs to be done very carefully, as there are often subtle > impacts (e.g., loop terminations). And because we have so many sign > issues already, compiling with "-Wsign-compare", etc, isn't likely to > help.
True.
Thanks.