public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/10095: istream::operator>>(int&) sets ios::badbit when ios::failbit is set.
@ 2003-04-22  0:53 bkoz
  0 siblings, 0 replies; 2+ messages in thread
From: bkoz @ 2003-04-22  0:53 UTC (permalink / raw)
  To: bkoz, gcc-bugs, gcc-prs, nobody, peturr02

Synopsis: istream::operator>>(int&) sets ios::badbit when ios::failbit is set.

Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Tue Apr 22 00:53:24 2003
Responsible-Changed-Why:
    Mine.
State-Changed-From-To: open->analyzed
State-Changed-By: bkoz
State-Changed-When: Tue Apr 22 00:53:24 2003
State-Changed-Why:
    confirmed.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10095


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

* libstdc++/10095: istream::operator>>(int&) sets ios::badbit when ios::failbit is set.
@ 2003-03-15 10:46 peturr02
  0 siblings, 0 replies; 2+ messages in thread
From: peturr02 @ 2003-03-15 10:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10095
>Category:       libstdc++
>Synopsis:       istream::operator>>(int&) sets ios::badbit when ios::failbit is set.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 15 10:46:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     peturr02@ru.is
>Release:        gcc-3.2.2
>Organization:
>Environment:
Red Hat Linux 8.0
>Description:
When ios::failbit is set in exceptions, ios::badbit will be set in rdstate() whenever basic_istream::operator>>(int&) sets ios::failbit in rdstate().
>How-To-Repeat:
See attachment.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="exceptionsbug3.cc"
Content-Disposition: inline; filename="exceptionsbug3.cc"

#include <sstream>

#undef NDEBUG
#include <cassert>

int main()
{
	using namespace std;

	istringstream stream("whatever");
	stream.exceptions(ios::failbit);

	try
	{
		int i;
		stream >> i;
	}
	catch (ios::failure&)
	{
	}

	assert(stream.rdstate() == ios::failbit);

	return 0;
}


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

end of thread, other threads:[~2003-04-22  0:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-22  0:53 libstdc++/10095: istream::operator>>(int&) sets ios::badbit when ios::failbit is set bkoz
  -- strict thread matches above, loose matches on Subject: below --
2003-03-15 10:46 peturr02

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