If it turns out that we can't detect it, we should prevent
it. Macros might be ugly but are better than relying on
programmer discipline.
FWIW, on my cross-compile NetBSD environment, I see the following when
we give isdigit() a bare char:
t.c: In function 'main':
t.c:11: warning: array subscript has type 'char'
(t.c is a simple test program I cooked up).
So I can at least make sure nothing is missed in the initial conversion.
To detect it, we could incorporate Tom's approach, say, into
debug builds. (That brings up another question, assert(),
but for another day.) Or add a configure option to enable
it.
Sounds reasonable to me.
--Ken
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers