Bug 8348 - fail() flag is set in istringstream when eof() flag is set !
Summary: fail() flag is set in istringstream when eof() flag is set !
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 3.2
: P3 normal
Target Milestone: ---
Assignee: Benjamin Kosnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-25 02:06 UTC by adamwilkshire
Modified: 2003-07-25 17:33 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
temp8.cc (226 bytes, application/octet-stream)
2003-05-21 15:17 UTC, adamwilkshire
Details

Note You need to log in before you can comment on or make changes to this bug.
Description adamwilkshire 2002-10-25 02:06:01 UTC
fail() returns true when an operation on istringstream succeeds and reaches the end.

Release:
g++ 3.2

Environment:
Solaris.
Reading specs from /opt/global/pkg/gcc-3.2/lib/gcc-lib/sparc-sun-solaris2.7/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/opt/global/pkg/ : (reconfigured) ../gcc-3.2/configure --prefix=/opt/global/pkg/gcc-3.2
Thread model: posix
gcc version 3.2

How-To-Repeat:
run the program without arguments, tellg() fails because of the flag ...
Comment 1 Paolo Carlini 2002-10-26 03:58:54 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Reproduced on x86-linux.
    Notice, however, that iss.fail() is set *not* by ">>" but
    by the next tellg().
Comment 2 Benjamin Kosnik 2002-11-01 05:38:27 UTC
From: bkoz@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libstdc++/8348
Date: 1 Nov 2002 05:38:27 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	bkoz@gcc.gnu.org	2002-10-31 21:38:27
 
 Modified files:
 	libstdc++-v3   : ChangeLog 
 	libstdc++-v3/include/bits: istream.tcc 
 	libstdc++-v3/testsuite/27_io: istream_seeks.cc 
 
 Log message:
 	2002-10-31  Benjamin Kosnik  <bkoz@redhat.com>
 	
 	PR libstdc++/8348
 	* include/bits/istream.tcc (istream::tellg): Remove sentry bits.
 	(istream::seekg): Same.
 	* testsuite/27_io/istream_seeks.cc (test06): New.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.1406&r2=1.1407
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/istream.tcc.diff?cvsroot=gcc&r1=1.34&r2=1.35
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/istream_seeks.cc.diff?cvsroot=gcc&r1=1.12&r2=1.13
 
Comment 3 Benjamin Kosnik 2002-11-01 08:34:17 UTC
Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-Why: Mine.
Comment 4 Benjamin Kosnik 2002-11-01 08:34:17 UTC
State-Changed-From-To: analyzed->feedback
State-Changed-Why: Fixed yesterday. In gcc/gcc-3_2-branches.
    
    -benjamin
Comment 5 Benjamin Kosnik 2002-11-01 16:27:30 UTC
From: bkoz@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libstdc++/8348
Date: 1 Nov 2002 16:27:30 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-branch
 Changes by:	bkoz@gcc.gnu.org	2002-11-01 08:27:30
 
 Modified files:
 	libstdc++-v3   : ChangeLog 
 	libstdc++-v3/include/bits: istream.tcc 
 	libstdc++-v3/testsuite/27_io: istream_seeks.cc 
 
 Log message:
 	2002-11-01  Benjamin Kosnik  <bkoz@redhat.com>
 	
 	PR libstdc++/8348
 	* include/bits/istream.tcc (istream::tellg): Remove sentry bits.
 	(istream::seekg): Same.
 	* testsuite/27_io/istream_seeks.cc (test06): New.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1057.2.159.2.42&r2=1.1057.2.159.2.43
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/istream.tcc.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.24.2.6.2.3&r2=1.24.2.6.2.4
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/istream_seeks.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.10.14.2&r2=1.10.14.2.2.1
 

Comment 6 adamwilkshire 2002-11-01 18:25:49 UTC
From: "Adam Wilkshire" <adamwilkshire@hotmail.com>
To: bkoz@gcc.gnu.org, adamwilkshire@hotmail.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: libstdc++/8348: fail() flag is set in istringstream when eof() flag is set !
Date: Fri, 01 Nov 2002 18:25:49 +0000

 <html><div style='background-color:'><DIV>
 <P>Great ! Thanks for the effort. </P>
 <P>Ciao, </P>
 <P>Adam.<BR><BR></P></DIV></div><br clear=all><hr>Broadband? Dial-up? Get reliable MSN Internet Access. <a href="http://g.msn.com/8HMJEN/2016">Click Here</a> </html>
Comment 7 Benjamin Kosnik 2002-11-01 18:46:18 UTC
State-Changed-From-To: feedback->closed
State-Changed-Why: Fixed.