Sujet : Re: Top 10 most common hard skills listed on resumes...
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.cDate : 09. Sep 2024, 18:37:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vbnboc$2g0vc$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Mozilla Thunderbird
On 09/09/2024 18:57, Bart wrote:
On 09/09/2024 17:21, Waldek Hebisch wrote:
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
C23 doesn't add any new support for 128-bit integers.
So what does _Bitint do with a width of 128 bits?
_BitInt types are not "integer types". Nor is gcc's __int128 type. Obviously they are very like integer types in many ways, but there are differences, so they do not count as "integer types" like the standard integer types or extended integer types (which C allows, but AFAIK no common compiler supports).
You might think the differences are minor or just "legal technicalities", but sometime it is relevant that while 0x1234567812345678 is a 64-bit integer constant, 0x12345678123456781234567812345678 is not a 128-bit integer constant even if you can use __int128 (gcc or clang extension) or _BitInt(128) (C23 bit-precise integer type) as though it were a 128-bit integer type in most circumstances.
For many purposes, however, you can use _BitInt(128) as though it were a normal 128-bit integer type, and ignore the details.
(I haven't done much testing with these myself. I wonder if gcc handles _BitInt(128) and __int128 identically in code generation.)