public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com> To: jason@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: libstdc++/6414: g++ 3.1 tellg() regression within last week Date: Tue, 23 Apr 2002 06:06:00 -0000 [thread overview] Message-ID: <20020423130605.6488.qmail@sources.redhat.com> (raw) The following reply was made to PR libstdc++/6414; it has been noted by GNATS. From: Jason Merrill <jason@redhat.com> To: libstdc++@gcc.gnu.org Cc: gcc-gnats@gcc.gnu.org Subject: Re: libstdc++/6414: g++ 3.1 tellg() regression within last week Date: Tue, 23 Apr 2002 14:00:44 +0100 --=-=-= Missed a spot. Testing now; I'll apply it to trunk and branch if it passes. 2002-04-23 Jason Merrill <jason@redhat.com> PR libstdc++/6414 * include/bits/fstream.tcc (basic_filebuf::seekoff): Adjust return value properly in the trivial case. * testsuite/27_io/istream_seeks.cc (test04): Make sure that tellg() returns the right value after a read. --=-=-= Content-Type: text/x-patch Content-Disposition: inline Index: include/bits/fstream.tcc =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/fstream.tcc,v retrieving revision 1.30 diff -c -p -r1.30 fstream.tcc *** include/bits/fstream.tcc 22 Apr 2002 20:28:04 -0000 1.30 --- include/bits/fstream.tcc 23 Apr 2002 12:55:24 -0000 *************** namespace std *** 567,573 **** else { __ret = _M_file.seekoff(__off, ios_base::cur, __mode); ! __ret += max(_M_out_cur, _M_in_cur) - _M_buf; } } _M_last_overflowed = false; --- 567,573 ---- else { __ret = _M_file.seekoff(__off, ios_base::cur, __mode); ! __ret += _M_in_cur - _M_filepos; } } _M_last_overflowed = false; Index: testsuite/27_io/istream_seeks.cc =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/27_io/istream_seeks.cc,v retrieving revision 1.10 diff -c -p -r1.10 istream_seeks.cc *** testsuite/27_io/istream_seeks.cc 7 Aug 2001 03:38:33 -0000 1.10 --- testsuite/27_io/istream_seeks.cc 23 Apr 2002 12:55:25 -0000 *************** void test04(void) *** 229,235 **** VERIFY( pos05 == pos06 + off_type(10) ); VERIFY( state01 == state02 ); pos06 = is03.tellg(); ! VERIFY( pos05 == pos06 ); #ifdef DEBUG_ASSERT assert(test); --- 229,242 ---- VERIFY( pos05 == pos06 + off_type(10) ); VERIFY( state01 == state02 ); pos06 = is03.tellg(); ! VERIFY( pos05 == pos06 ); ! ! // libstdc++/6414 ! if01.seekg(0, std::ios_base::beg); ! pos01 = if01.tellg(); ! if01.peek(); ! pos02 = if01.tellg(); ! VERIFY( pos02 == pos01 ); #ifdef DEBUG_ASSERT assert(test); --=-=-=--
next reply other threads:[~2002-04-23 13:06 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-04-23 6:06 Jason Merrill [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-04-23 15:00 jason 2002-04-23 5:32 jason 2002-04-22 22:56 ljrittle 2002-04-22 20:16 snyder
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020423130605.6488.qmail@sources.redhat.com \ --to=jason@redhat.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=jason@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).