On 03/14/14 18:49, Richard W.M. Jones wrote: > On Fri, Mar 14, 2014 at 06:27:07PM +0100, Laszlo Ersek wrote: >> *Why* someone would want to use an integer constant with type >> "uint_least64_t" is a separate matter. One example follows -- assume all >> of the below: >> - suppose you write portable C99 source code, >> - hence you can't take uint64_t for granted, >> - you want a constant that's otherwise small enough to be represented as >> "int", >> - but you want that constant to trigger the "usual arithmetic >> conversions" (see 6.3.1.8) to evaluate expressions that the constant >> participates in in at least 64 bits, >> - you want the narrowest type that allows you to do this. > > - You want the code to self-document its intentions.
I do. > I don't think ULL does that because it requires people to know that > ULL is at least 64 bits. Oh. I see what you mean. This never crossed my mind (= people missing the fact that unsigned long long can represent at least up to 2^64-1). Laszlo