- Don't be fooled by cpp.sh - 3 Updates
Keith Thompson <Keith.S.Thompson+u@gmail.com>: Dec 17 11:51AM -0800 David Brown <david.brown@hesbynett.no> writes: [...] > __int128 meets almost all the technical requirements to be a signed > integer type - the only missing one is the classification, as that would > mean maxint_t would have to be (at least) 128 bits. It doesn't meet *all* the requirements. N1570 6.4.4.1p6 (Integer constants): If an integer constant cannot be represented by any type in its list, it may have an extended integer type, if the extended integer type can represent its value. In gcc, there are no constants of type __int128. (The word "may" is a bit ambiguous, and it could be argued that an implementation isn't required to support constants of type int128_t even if it's an extended integer type.) -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com [Note updated email address] Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */ |
David Brown <david.brown@hesbynett.no>: Dec 17 10:10PM +0100 On 17/12/2019 20:51, Keith Thompson wrote: > (The word "may" is a bit ambiguous, and it could be argued that an > implementation isn't required to support constants of type int128_t > even if it's an extended integer type.) That is how I have always read that part of the standard - I hadn't considered your reading. But I agree that your interpretation is just as valid. Certainly (based on other discussions involving gcc developers) the lack of 128-bit integer constants is viewed as one reason why __int128 is not a "full" integer type to the same degree as the other integer types. (With the maxint_t issue being another key reason, and lack of support in library functions such as printf, *abs, strto*, etc., being others.) |
Vir Campestris <vir.campestris@invalid.invalid>: Dec 17 09:56PM On 17/12/2019 05:20, Robert Wessel wrote: <snip> > but the bank needs to perform operations on those balances. Ah, that makes sense. Thanks Andy |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment