public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/16957] New: std::stringbuf::seekoff return wrong position value
@ 2004-08-10 9:23 sepherosa at softhome dot net
2004-08-10 9:34 ` [Bug libstdc++/16957] " giovannibajo at libero dot it
0 siblings, 1 reply; 2+ messages in thread
From: sepherosa at softhome dot net @ 2004-08-10 9:23 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=16957
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libstdc++/16957] std::stringbuf::seekoff return wrong position value
2004-08-10 9:23 [Bug libstdc++/16957] New: std::stringbuf::seekoff return wrong position value sepherosa at softhome dot net
@ 2004-08-10 9:34 ` giovannibajo at libero dot it
0 siblings, 0 replies; 2+ 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 -------
*** This bug has been marked as a duplicate of 16956 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16957
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-08-10 9:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-10 9:23 [Bug libstdc++/16957] New: std::stringbuf::seekoff return wrong position value sepherosa at softhome dot net
2004-08-10 9:34 ` [Bug libstdc++/16957] " giovannibajo at libero dot it
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).