Paul Eggert wrote: > > On a system where 'unsigned char' and 'int' have the same number of > > bits, the getc() and fgetc() result EOF would be ambiguous: it could > > be EOF or it could be a casted 'unsigned char' value. It sounds very > > improbable that such a system exists, now or in the future. > > They do exist. Here's one example that I found with a quick Google search: > > http://www.ecse.rpi.edu/courses/CStudio/Cal_lab/ADI_DSP/21K/INCLUDE/LIMITS.H > > Typically they're DSPs, so they are freestanding implementations and > don't have getc. If they did have getc, getc would probably return > something in the range -1..255 anyway, so there would be no ambiguity.
OK, I'm convinced. Thanks for having seen and fixed that. UCHAR_MAX and CHAR_BIT are revealed to be less hardcoded than I thought. Bruno