public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Pétur Runólfsson" <peturr02@ru.is>
To: jlquinn@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: RE: libstdc++/10093: Regression: Setting failbit in exceptions doesn't work
Date: Mon, 24 Mar 2003 18:26:00 -0000	[thread overview]
Message-ID: <20030324182602.24791.qmail@sources.redhat.com> (raw)

The following reply was made to PR libstdc++/10093; it has been noted by GNATS.

From: =?iso-8859-1?Q?P=E9tur_Run=F3lfsson?= <peturr02@ru.is>
To: <jlquinn@optonline.net>,
	"Martin Sebor" <sebor@roguewave.com>
Cc: <gcc-gnats@gcc.gnu.org>,
	<libstdc++@gcc.gnu.org>
Subject: RE: libstdc++/10093: Regression: Setting failbit in exceptions doesn't work
Date: Mon, 24 Mar 2003 18:21:12 -0000

 I wrote:
 > I agree, however I also think that exceptions() should be consistent
 > with itself, that is, setting exceptions(foobit) should simply mean
 > that whenever foobit is set in rdstate(), an exception is thrown.
 > In the current implementation (and to some extent, the standard)
 > the effect of exceptions(foobit) differs between the various I/O
 > functions and depends on the value of foobit.
 
 Just to clarify:
 
 What I think that ios::exceptions() means (and what appears to have
 been the intent, judging by some old USENET posts) is that this
 should always work:
 
 istream is(...);
 is.exceptions(...);
 ...
 
 try
 {
   is >> x;
   assert((is.exceptions() & is.rdstate()) =3D=3D 0);
 }
 catch (...)
 {
   assert((is.exceptions() & is.rdstate()) !=3D 0);
 }
 
 Likewise for ostream and for unformatted I/O functions. Also, the
 value of is.rdstate() at the end of this code should not depend on
 the value of is.exceptions().
 
 Regards,
 Petur


             reply	other threads:[~2003-03-24 18:26 UTC|newest]

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

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=20030324182602.24791.qmail@sources.redhat.com \
    --to=peturr02@ru.is \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=jlquinn@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).