libstdc++/10132: filebuf destructor throws exceptions

Pétur Runólfsson peturr02@ru.is
Thu Apr 24 18:56:00 GMT 2003


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

From: =?iso-8859-1?Q?P=E9tur_Run=F3lfsson?= <peturr02@ru.is>
To: "Benjamin Kosnik" <bkoz@redhat.com>
Cc: <gcc-bugs@gcc.gnu.org>,
	<gcc-gnats@gcc.gnu.org>
Subject: RE: libstdc++/10132: filebuf destructor throws exceptions
Date: Thu, 24 Apr 2003 18:48:06 -0000

 > Here's something to think about. I think this is pretty good.=20
 > Something like it will have to be done for the corresponding=20
 > underflow bits.
 
 Maybe I'm missing something, but how does this fix the bug if
 some exceptions are rethrown?
 
 Also, what's the rationale behind rethrowing some but not all
 exceptions?
 
 I don't think that basic_filebuf should catch exceptions thrown
 by use_facet or codecvt members. It is clear from 27.6.2.1 etc.
 that streambuf members may throw; if underflow() fails because
 an exception is thrown badbit, not eofbit, should be set in
 rdstate(); and if badbit is set in exceptions() the original
 exception should be rethrown.
 
 Petur
 



More information about the Gcc-prs mailing list