public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/16956] New: std::stringbuf::seekoff return wrong position value
@ 2004-08-10  9:21 sepherosa at softhome dot net
  2004-08-10  9:34 ` [Bug libstdc++/16956] " giovannibajo at libero dot it
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: sepherosa at softhome dot net @ 2004-08-10  9:21 UTC (permalink / raw)
  To: gcc-bugs

std::stringbuf::seekoff return wrong position value.
solution: patch:

--- include/bits/sstream.tcc.orig	2004-08-10 17:11:28.000000000 +0800
+++ include/bits/sstream.tcc	2004-08-10 17:11:59.000000000 +0800
@@ -160,14 +160,14 @@
 	      && this->egptr() - __beg >= __newoffi + __off)
 	    {
 	      this->gbump((__beg + __newoffi + __off) - this->gptr());
-	      __ret = pos_type(__newoffi);
+	      __ret = pos_type(__newoffi + __off);
 	    }
 	  if ((__testout || __testboth)
 	      && __newoffo + __off >= 0
 	      && this->egptr() - __beg >= __newoffo + __off)
 	    {
 	      this->pbump((__beg + __newoffo + __off) - this->pptr());
-	      __ret = pos_type(__newoffo);
+	      __ret = pos_type(__newoffo + __off);
 	    }
 	}
       return __ret;

-- 
           Summary: std::stringbuf::seekoff return wrong position value
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sepherosa at softhome dot net
                CC: gcc-bugs at gcc dot gnu dot org,sepherosa at softhome
                    dot net
 GCC build triplet: gcc version 3.4.1 20040618 [DragonFly] (prerelease)
  GCC host triplet: gcc version 3.4.1 20040618 [DragonFly] (prerelease)
GCC target triplet: gcc version 3.4.1 20040618 [DragonFly] (prerelease)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16956


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/16956] std::stringbuf::seekoff return wrong position value
  2004-08-10  9:21 [Bug libstdc++/16956] New: std::stringbuf::seekoff return wrong position value sepherosa at softhome dot net
@ 2004-08-10  9:34 ` giovannibajo at libero dot it
  2004-08-10  9:35 ` giovannibajo at libero dot it
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: giovannibajo at libero dot it @ 2004-08-10  9:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-08-10 09:34 -------
*** Bug 16957 has been marked as a duplicate of this bug. ***

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16956


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/16956] std::stringbuf::seekoff return wrong position value
  2004-08-10  9:21 [Bug libstdc++/16956] New: std::stringbuf::seekoff return wrong position value sepherosa at softhome dot net
  2004-08-10  9:34 ` [Bug libstdc++/16956] " giovannibajo at libero dot it
@ 2004-08-10  9:35 ` giovannibajo at libero dot it
  2004-08-11 23:11 ` pcarlini at suse dot de
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: giovannibajo at libero dot it @ 2004-08-10  9:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-08-10 09:35 -------
*** Bug 16958 has been marked as a duplicate of this bug. ***

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16956


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/16956] std::stringbuf::seekoff return wrong position value
  2004-08-10  9:21 [Bug libstdc++/16956] New: std::stringbuf::seekoff return wrong position value sepherosa at softhome dot net
  2004-08-10  9:34 ` [Bug libstdc++/16956] " giovannibajo at libero dot it
  2004-08-10  9:35 ` giovannibajo at libero dot it
@ 2004-08-11 23:11 ` pcarlini at suse dot de
  2004-08-12 22:26 ` cvs-commit at gcc dot gnu dot org
  2004-09-23 11:01 ` [Bug libstdc++/16956] [3.4 only] " pcarlini at suse dot de
  4 siblings, 0 replies; 6+ messages in thread
From: pcarlini at suse dot de @ 2004-08-11 23:11 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pcarlini at suse dot de
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-11 23:11:21
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16956


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/16956] std::stringbuf::seekoff return wrong position value
  2004-08-10  9:21 [Bug libstdc++/16956] New: std::stringbuf::seekoff return wrong position value sepherosa at softhome dot net
                   ` (2 preceding siblings ...)
  2004-08-11 23:11 ` pcarlini at suse dot de
@ 2004-08-12 22:26 ` cvs-commit at gcc dot gnu dot org
  2004-09-23 11:01 ` [Bug libstdc++/16956] [3.4 only] " pcarlini at suse dot de
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-12 22:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-08-12 22:26 -------
Subject: Bug 16956

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	paolo@gcc.gnu.org	2004-08-12 22:26:33

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/bits: sstream.tcc 
	libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char: 1.cc 
	libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t: 
	                                                              1.cc 
	libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char: 1.cc 
	libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/wchar_t: 
	                                                              1.cc 
Added files:
	libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char: 
	                                                           16956.cc 
	libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t: 
	                                                              16956.cc 

Log message:
	2004-08-12  Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/16956
	* include/bits/sstream.tcc (basic_stringbuf<>::seekoff): Add __off
	to the returned value, reorganize a bit.
	* testsuite/27_io/basic_stringbuf/seekoff/char/16956.cc: New.
	* testsuite/27_io/basic_stringbuf/seekoff/wchar_t/16956.cc: New.
	
	* testsuite/27_io/basic_stringbuf/seekoff/char/1.cc: Remove junk.
	* testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/seekpos/char/1.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/seekpos/wchar_t/1.cc: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2609&r2=1.2610
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/sstream.tcc.diff?cvsroot=gcc&r1=1.40&r2=1.41
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/16956.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t/16956.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/wchar_t/1.cc.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16956


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/16956] [3.4 only] std::stringbuf::seekoff return wrong position value
  2004-08-10  9:21 [Bug libstdc++/16956] New: std::stringbuf::seekoff return wrong position value sepherosa at softhome dot net
                   ` (3 preceding siblings ...)
  2004-08-12 22:26 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-23 11:01 ` pcarlini at suse dot de
  4 siblings, 0 replies; 6+ messages in thread
From: pcarlini at suse dot de @ 2004-09-23 11:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-09-23 11:01 -------
Fixed for 4.0. The deep behavior change is not suited for a dot-release.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16956


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-09-23 11:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-10  9:21 [Bug libstdc++/16956] New: std::stringbuf::seekoff return wrong position value sepherosa at softhome dot net
2004-08-10  9:34 ` [Bug libstdc++/16956] " giovannibajo at libero dot it
2004-08-10  9:35 ` giovannibajo at libero dot it
2004-08-11 23:11 ` pcarlini at suse dot de
2004-08-12 22:26 ` cvs-commit at gcc dot gnu dot org
2004-09-23 11:01 ` [Bug libstdc++/16956] [3.4 only] " pcarlini at suse dot de

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).