public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: peturr02@ru.is
To: gcc-gnats@gcc.gnu.org
Subject: libstdc++/10093: Regression: Setting failbit in exceptions doesn't work
Date: Sat, 15 Mar 2003 10:36:00 -0000	[thread overview]
Message-ID: <20030315102736.23295.qmail@sources.redhat.com> (raw)


>Number:         10093
>Category:       libstdc++
>Synopsis:       Regression: Setting failbit in exceptions doesn't work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 15 10:36:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     peturr02@ru.is
>Release:        gcc version 3.3 20030310 (prerelease)
>Organization:
>Environment:
Red Hat Linux 8.0
>Description:
Setting ios_base::failbit in basic_ios::exceptions does not cause basic_istream::operator>>(int&) to throw an exception.

This appears to have been caused by the recent patch for PR libstdc++/9561.
>How-To-Repeat:
See attachment.
>Fix:

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

#include <sstream>

#undef NDEBUG
#include <cassert>

int main()
{
	using namespace std;

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

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

	return 0;
}


             reply	other threads:[~2003-03-15 10:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-15 10:36 peturr02 [this message]
2003-03-22 15:22 paolo
2003-03-23  6:56 Jerry Quinn
2003-03-23 19:26 Pétur Runólfsson
2003-03-23 20:30 Martin Sebor
2003-03-24 11:09 Pétur Runólfsson
2003-03-24 18:26 Pétur Runólfsson
2003-03-26  2:56 Martin Sebor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030315102736.23295.qmail@sources.redhat.com \
    --to=peturr02@ru.is \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).