isascii(3) macros and casts
Alejandro Colomar
alx@kernel.org
Wed Dec 11 22:11:25 GMT 2024
On Wed, Dec 11, 2024 at 01:42:15PM -0800, Paul Eggert wrote:
> On 2024-12-11 12:53, Alejandro Colomar wrote:
> > On the other hand, calling isdigit() with anything that's not a valid
> > char or EOF (-1) is already UB (and IMO, should stay as UB), so the
> > first approach should be enough, no?
>
> True, though it saves no instructions to make the behavior defined.
It saves readability, which is scarcer than instructions. :-)
--
<https://www.alejandro-colomar.es/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20241211/3ae5b2d3/attachment.sig>
More information about the Libc-alpha
mailing list