NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/58913: ctype(3) macros fail on (unsigned)EOF



If you call such a function as isspace((unsigned)EOF),
> the effect should be identical to calling it as isspace((int)
> (unsigned)EOF) or just isspace(EOF), since EOF is specified
> to expand to an integer constant expression with type int
> (and a negative value).

I don't think the standard requires any explicit cast to int for macro-like implementations. As such the code is just as broken as the sadly too common pattern of isspace((int)ch).

Joerg


Home | Main Index | Thread Index | Old Index