From: Jeff Hostetler Date: Mon, 26 Mar 2018 18:33:04 GMT Subject: Re: [RFC PATCH v5 0/8] rebase-interactive Message-ID: <3d845e99-e392-a62f-b83e-33b58482fc54@jeffhostetler.com> In-Reply-To: On 3/26/2018 2:00 PM, Junio C Hamano wrote: > Jeff Hostetler writes: > >> I am concerned that the above compiler error message says that uintmax_t >> is defined as an "unsigned long" (which is defined as *at least* 32 bits, >> but not necessarily 64. But a uint64_t is defined as a "unsigned long long" >> and guaranteed as a 64 bit value. > > On a platform whose uintmax_t is u32, is it realistic to expect that > we would be able to use u64, even if we explicitly ask for it, in > the first place? > > In other words, on a platform that handles uint64_t, I would expect > uintmax_t to be wide enough to hold an uint64_t value without > truncation. > I was just going by what the reported compiler error message was. It said that "unsigned long" didn't match the uint64_t variable. And that made me nervous. If all of the platforms we build on define uintmax_t >= 64 bits, then it doesn't matter. If we do have a platform where uintmax_t is u32, then we'll have a lot more breakage than in just the new function I added. Thanks, Jeff