On Monday, April 5, 2021 at 4:28:40 AM UTC+10, Bart wrote:
> >> However, why not just use CHAR_MIN/MAX from limits.h?
> >
> > This *is* from limits.h in PDPCLIB.
> That's rather odd then. You'd think the limits.h file /that comes with
> the compiler/ would know if chars were signed or not!
The person providing the C library can be different
from the person providing the compiler.
The person providing the C preprocessor can be
different from the person providing the compiler.
In one of my situations, all 3 (PDPCLIB, preprocessor,
compiler) are from 3 different people.
However, in my situation, there is modifiable source
for all 3, so that provides some relief. So the
preprocessor could be modified to allow the user
to choose whether to make chars signed or unsigned,
and have warning in the "help" that they need to make
sure the compiler options match. But as I said, the
whole thing could be illegitimate.
BFN. Paul.