patch: remaining -Wall warnings

Benjamin Kosnik bkoz@cygnus.com
Fri Aug 13 15:09:00 GMT 1999


> The standard requirement that all chars plus EOF can be represented is
> easy to fulfill with a normal unsigned long (or long).  The standard
> only requires that the ASCII chars can be presented.  For most
> implementations the encoding is UCS4 and then it still works since
> 0xffffffff is a value with bit 31 set, which is no legal UCS4 value.

aaah. Thanks.

The problem is that these types have to match, meaning eof's value must 
be able to be represented by char_traits::int_type, which is what eof() 
returns. 

I can either break the standard, and have char_traits::eof() not return 
int_type but long or unsigned long, 

or

change char_traits::int_type to long or unsigned long


??

-benjamin


More information about the Libstdc++ mailing list