No and yes. Cast of any char flavor to an int is not
required because a char can be promoted to an int. The
problem is sign extension when a signed char is promoted to
an int. Combined with char being able to be signed.
Compounded by char being able to not be signed, so the
compiler might not always notice.
Right, but I was thinking we'd be doing:
isdigit((unsigned char) c);
Which, AFAIK, is correct.
Some people advocated (and I thought that's what Lyndon was talking about):
isdigit((int)(unsigned char) c);