[PATCH v5] Replace {u}int_fast{16|32} with {u}int32_t
Paul Eggert
eggert@cs.ucla.edu
Thu Apr 14 00:41:22 GMT 2022
On 4/13/22 16:59, Noah Goldstein via Libc-alpha wrote:
> - return h & 0xffffffff;
> + return h;
Please omit this change, as the "& 0xffffffff" is needed on
(admittedly-hypothetical) hosts where unsigned int is wider than 32
bits, which POSIX allows. Omitting this change shouldn't affect the
generated machine code on typical platforms.
> - uint_fast16_t type;
> + uint16_t type;
Since 'type' is compared to qtypes[i] which is 'short int', I suggest
using 'short int' here instead.
Otherwise, looks good; thanks.
A bigger cleanup would replace a lot of the 'uint32_t' stuff with
'unsigned', as a good deal of the code seems to be written under the
mistaken assumption that int can be only 16 bits, but that's low priority.
More information about the Libc-alpha
mailing list