Sujet : Re: Top 10 most common hard skills listed on resumes...
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 09. Sep 2024, 20:08:00
Autres entêtes
Organisation : None to speak of
Message-ID : <87zfog1w8f.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : Gnus/5.13 (Gnus v5.13)
Waldek Hebisch <
antispam@fricas.org> writes:
[...]
Concerning '<stdint.h>', somewhat worring thing is that several types
there seem to be optional (or maybe where optional in older versions
of the standard). I am not sure if this can be real problem,
but too many times I saw that on various issues developers say
"this in not mandatory, so we will skip it".
I don't think you need to worry about it.
The exact-width types are optional because some implementations might
not be able to support them. For example, I've used systems that only
had 8-bit and 64-bit integers; if the implementation I used had
supported C99, it wouldn't have defined [u]int{16,32}_t. The
exact-width types are not allowed to have padding bits, and the signed
types must be 2's-complement (which C23 mandates for all signed integer
types).
But the vast majority of current systems support signed and unsigned
types of 8, 16, 32, and 64 bits, and will support all 8 exact-width
types. (And you can use, for example, `#ifdef UINT32_MAX` to test
whether uint32_t is supported.)
And it's likely that the "least" or "fast" types will be more suitable
for your purpose. Those types are mandatory for widths of 8, 16, 32,
and 64 bits.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */