This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/12875] Weird behaviour in basic_filebuf::setbuf()
- From: "paolo at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Nov 2003 16:50:04 -0000
- Subject: [Bug libstdc++/12875] Weird behaviour in basic_filebuf::setbuf()
- References: <20031102113858.12875.peturr02@ru.is>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From paolo at gcc dot gnu dot org 2003-11-08 16:50 -------
N.B.: currently we have another (latent) problem related to this one:
if setbuf(s != 0, n > 0) is called *before* open(), the buffer
provided by the user is not used! That's because open() calls always
_M_allocate_internal_buffer() and the latter finds !_M_buf_allocated
true && this->_M_buf_size > 0.
Will fix and provide a testcase for this problem too.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12875