This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch: remaining -Wall warnings


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]