From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6004 invoked by alias); 24 Feb 2003 18:26:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 5975 invoked by uid 71); 24 Feb 2003 18:26:00 -0000 Date: Mon, 24 Feb 2003 18:26:00 -0000 Message-ID: <20030224182600.5974.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: paolo@gcc.gnu.org Subject: libstdc++/9701 Reply-To: paolo@gcc.gnu.org X-SW-Source: 2003-02/txt/msg01272.txt.bz2 List-Id: The following reply was made to PR libstdc++/9701; it has been noted by GNATS. From: paolo@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: libstdc++/9701 Date: 24 Feb 2003 18:22:58 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: paolo@gcc.gnu.org 2003-02-24 18:22:58 Modified files: libstdc++-v3 : ChangeLog libstdc++-v3/include/bits: fstream.tcc sstream.tcc streambuf.tcc libstdc++-v3/include/std: std_fstream.h std_sstream.h std_streambuf.h libstdc++-v3/testsuite/27_io: filebuf_virtuals.cc stringbuf_virtuals.cc Log message: 2003-02-24 Paolo Carlini Nathan Myers PR libstdc++/9404, PR libstdc++/9701 (partial) (aka pptr == epptr implies overflow) * include/bits/fstream.tcc (_M_allocate_internal_buffer): Consistently, _M_out_end points to the end of the buffer just created. (overflow): Tweak to use _M_out_buf_size(). (_M_convert_to_external): The role of the old _M_out_end is now played by _M_out_lim. (_M_really_overflow): Likewise. (seekoff): Likewise. (setbuf): _M_out_end points to the end of the external buffer. * include/bits/sstream.tcc (overflow): Rewrote, taking into account the resolution of DR 169 (TC). (seekoff): Use _M_string.capacity(); ios_base::end is now _M_out_lim. (seekpos): Use _M_string.capacity(); tweak. * include/bits/streambuf.tcc (sputc, xsputn): Remove comments. * include/std/std_fstream.h (sync): The role of the old _M_out_end is now played by _M_out_lim. (_M_set_indeterminate): Use _M_set_determinate. (_M_set_determinate): _M_out_end is now _M_out_lim. (_M_is_indeterminate): Likewise. * include/std/std_sstream.h (str()): _M_out_end is now _M_out_lim. (_M_stringbuf_init): Don't set _M_buf_size, unused for sstreams, which have the information readily available as _M_string.capacity(); for ate and app modes, pass the string size to _M_really_sync. (_M_really_sync): Consistently set _M_out_end and _M_out_lim, to point to the end of the buffer (i.e., epptr) and to the string end, respectively. * include/std/std_streambuf.h: tweak comments, add _M_out_lim, which points to the right limit of the used put area. (_M_out_cur_move): The role of the old _M_out_end is now played by _M_out_lim. (_M_out_buf_size): Simplify: now (when _M_out_cur) return simply _M_out_end - _M_out_cur (i.e., pptr), _very_ close to the letter of the standard. (basic_streambuf()): Initialize _M_out_lim too. * testsuite/27_io/filebuf_virtuals.cc (test10): Trivial tweak. * testsuite/27_io/filebuf_virtuals.cc (test11): Add. * testsuite/27_io/stringbuf_virtuals.cc (test09): Add. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.1558&r2=1.1559 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/fstream.tcc.diff?cvsroot=gcc&r1=1.50&r2=1.51 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/sstream.tcc.diff?cvsroot=gcc&r1=1.16&r2=1.17 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/streambuf.tcc.diff?cvsroot=gcc&r1=1.25&r2=1.26 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/std/std_fstream.h.diff?cvsroot=gcc&r1=1.20&r2=1.21 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/std/std_sstream.h.diff?cvsroot=gcc&r1=1.14&r2=1.15 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/std/std_streambuf.h.diff?cvsroot=gcc&r1=1.13&r2=1.14 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc.diff?cvsroot=gcc&r1=1.12&r2=1.13 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/stringbuf_virtuals.cc.diff?cvsroot=gcc&r1=1.5&r2=1.6