This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] PR libstdc++/53984 handle exceptions in basic_istream::sentry
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: Andreas Schwab <schwab at suse dot de>, libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 Jul 2017 23:06:11 +0100
- Subject: Re: [PATCH] PR libstdc++/53984 handle exceptions in basic_istream::sentry
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jwakely at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 329F45D689
- References: <20170725204326.GA28500@redhat.com> <mvm7eyvuvmg.fsf@suse.de> <0adc99bb-152b-2cd3-9f42-467428e193d2@oracle.com> <1d403da3-7095-b6ef-d7be-433a82c2d2eb@oracle.com>
On 26/07/17 20:14 +0200, Paolo Carlini wrote:
Hi again,
On 26/07/2017 16:27, Paolo Carlini wrote:
Hi,
On 26/07/2017 16:21, Andreas Schwab wrote:
ERROR: 27_io/basic_fstream/53984.cc: unknown dg option:
dg-require-file-io 18 {} for " dg-require-file-io 18 "" "
Should be already fixed, a trivial typo.
... but now the new test simply fails for me. If I don't spot
something else trivial over the next few hours I guess better waiting
for Jon to look into that.
Sorry about that, I must have only checked for FAILs and missed the
ERRORs.
It should have been an ifstream not fstream, otherwise the filebuf
can't even open the file. Fixed like so, committed to trunk.
commit 9c0a34c998843402049165f5e2bb01643da22fb7
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Jul 26 23:01:08 2017 +0100
PR libstdc++/53984 fix failing test
PR libstdc++/53984
* testsuite/27_io/basic_fstream/53984.cc: Fix test.
diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc
index 53c77c2..e49d2b1 100644
--- a/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_fstream/53984.cc
@@ -23,10 +23,13 @@
void
test01()
{
- std::fstream in(".");
- int x;
- in >> x;
- VERIFY( in.bad() );
+ std::ifstream in(".");
+ if (in)
+ {
+ int x;
+ in >> x;
+ VERIFY( in.bad() );
+ }
}
int