[Patch] Clean up sbumpc, move back _M_buf_size, do not special case unbuffered _M_underflow...

Benjamin Kosnik bkoz@redhat.com
Mon Jun 9 21:47:00 GMT 2003


>The other case, where it's already open but no I/O has 
>happened yet, is a problem.  We do nothing, then, but the standard says 
>it *must* become unbuffered.  

If opening is considered an io operation, then the behavior, as it
stands, is correct. This is what v2/v3/icc do, and seems reasonable
given the alternative you outline....

>The fact is, we aren't required to care whether I/O has been done.  

Again, see:

27.8.1.4 - Overridden virtual functions

If you think there is a bug in the standard, please file a DR...

>If there's something in a buffer, we are free to discard it.

.... or else this situation is entered. I disagree with your
interpretation here.

-benjamin



More information about the Libstdc++ mailing list