This is the mail archive of the
mailing list for the GCC project.
RE: [PATCH] RE: Testsuite problem
- From: Pétur Runólfsson <peturr02 at ru dot is>
- To: "Zack Weinberg" <zack at codesourcery dot com>
- Cc: "Benjamin Kosnik" <bkoz at redhat dot com>,<libstdc++ at gcc dot gnu dot org>,<gcc-patches at gcc dot gnu dot org>
- Date: Thu, 22 Apr 2004 16:50:44 -0000
- Subject: RE: [PATCH] RE: Testsuite problem
Zack Weinberg wrote:
> I clearly wasn't paying enough attention here. Can you please clarify
> why the original patch is incorrect? I do not see why the change made
> should have caused the write() operation not to fail.
I don't know why it does, but it is pretty clear from the patch that
write() is not failing any more:
ret = fb.close();
- VERIFY( ret == NULL );
+ VERIFY( ret != NULL );
VERIFY( !fb.is_open() );
basic_filebuf::close() is supposed to write out the contents of the
buffer, possibly call codecvt::unshift(), and finally close the file.
If any of the three operations fail, it returns NULL, if all succeed,
it returns this. Since close() isn't returning NULL any more, it follows
that write() must now be succeeding.