public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/3114: DR 129: ostream::seekp() does not report an error
@ 2001-06-11 11:28 bkoz
0 siblings, 0 replies; 3+ messages in thread
From: bkoz @ 2001-06-11 11:28 UTC (permalink / raw)
To: bkoz, gcc-bugs, gcc-prs, kenny.simpson, nobody, theonetruekenny
Synopsis: DR 129: ostream::seekp() does not report an error
Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Mon Jun 11 11:28:24 2001
Responsible-Changed-Why:
Mine.
State-Changed-From-To: open->feedback
State-Changed-By: bkoz
State-Changed-When: Mon Jun 11 11:28:24 2001
State-Changed-Why:
I'm testing this patch
Index: include/bits/istream.tcc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/istream.tcc,v
retrieving revision 1.15
diff -c -p -r1.15 istream.tcc
*** istream.tcc 2001/05/31 20:33:06 1.15
--- istream.tcc 2001/06/11 18:27:26
*************** namespace std
*** 959,965 ****
{
#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams?
! this->rdbuf()->pubseekpos(__pos, ios_base::in);
#endif
}
catch(exception& __fail)
--- 959,969 ----
{
#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams?
! pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::in);
!
! // 129. Need error indication from seekp() and seekg()
! if (__err == pos_type(off_type(-1)))
! this->setstate(failbit);
#endif
}
catch(exception& __fail)
*************** namespace std
*** 987,993 ****
{
#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams?
! this->rdbuf()->pubseekoff(__off, __dir, ios_base::in);
#endif
}
catch(exception& __fail)
--- 991,1002 ----
{
#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams?
! pos_type __err = this->rdbuf()->pubseekoff(__off, __dir,
! ios_base::in);
!
! // 129. Need error indication from seekp() and seekg()
! if (__err == pos_type(off_type(-1)))
! this->setstate(failbit);
#endif
}
catch(exception& __fail)
Index: include/bits/ostream.tcc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/ostream.tcc,v
retrieving revision 1.11
diff -c -p -r1.11 ostream.tcc
*** ostream.tcc 2001/05/31 12:14:54 1.11
--- ostream.tcc 2001/06/11 18:27:27
*************** namespace std
*** 411,420 ****
bool __testok = this->fail() != true;
if (__testok)
#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams?
! this->rdbuf()->pubseekpos(__pos, ios_base::out);
#endif
return *this;
}
--- 411,426 ----
bool __testok = this->fail() != true;
if (__testok)
+ {
#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams?
! pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::out);
!
! // 129. Need error indication from seekp() and seekg()
! if (__err == pos_type(off_type(-1)))
! this->setstate(failbit);
#endif
+ }
return *this;
}
*************** namespace std
*** 426,434 ****
bool __testok = this->fail() != true;
if (__testok)
#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams?
! this->rdbuf()->pubseekoff(__off, __d, ios_base::out);
#endif
return *this;
}
--- 432,446 ----
bool __testok = this->fail() != true;
if (__testok)
+ {
#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams?
! this->rdbuf()->pubseekoff(__off, __d, ios_base::out);
!
! // 129. Need error indication from seekp() and seekg()
! if (__err == pos_type(off_type(-1)))
! this->setstate(failbit);
! }
#endif
return *this;
}
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3114&database=gcc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: libstdc++/3114: DR 129: ostream::seekp() does not report an error
@ 2001-06-12 13:58 bkoz
0 siblings, 0 replies; 3+ messages in thread
From: bkoz @ 2001-06-12 13:58 UTC (permalink / raw)
To: bkoz, gcc-bugs, gcc-prs, kenny.simpson, theonetruekenny
Synopsis: DR 129: ostream::seekp() does not report an error
State-Changed-From-To: feedback->closed
State-Changed-By: bkoz
State-Changed-When: Tue Jun 12 13:42:21 2001
State-Changed-Why:
Fixed.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3114&database=gcc
^ permalink raw reply [flat|nested] 3+ messages in thread
* libstdc++/3114: DR 129: ostream::seekp() does not report an error
@ 2001-06-10 23:06 theonetruekenny
0 siblings, 0 replies; 3+ messages in thread
From: theonetruekenny @ 2001-06-10 23:06 UTC (permalink / raw)
To: gcc-gnats; +Cc: kenny.simpson
>Number: 3114
>Category: libstdc++
>Synopsis: DR 129: ostream::seekp() does not report an error
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 10 23:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: theonetruekenny@yahoo.com
>Release: cvs 20010610
>Organization:
>Environment:
source
>Description:
see:
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#129
>How-To-Repeat:
look at include/bits/ostream.tcc line 409, notice that no error reporting is done.
>Fix:
If the call to pubseekpos returns pos_type(off_type(-1)), call
this->setstate(ios_base::badbit).
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-06-12 13:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-11 11:28 libstdc++/3114: DR 129: ostream::seekp() does not report an error bkoz
-- strict thread matches above, loose matches on Subject: below --
2001-06-12 13:58 bkoz
2001-06-10 23:06 theonetruekenny
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).