This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] RE: Testsuite problem
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Pétur Runólfsson <peturr02 at ru dot is>
- 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 12:23:33 -0700
- Subject: Re: [PATCH] RE: Testsuite problem
- References: <07D05A69A3D0C14FAEA60C3ACE8E5564028F5632@mail.ru.is>
Pétur Runólfsson <peturr02@ru.is> writes:
> 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.
That is logical, but I don't think it conforms with what the code
does. Specifically, if close calls write and write returns an error,
I think close returns successfully anyway. Now, that might itself be a
bug, or I might've gotten confused with the maze of template functions
all calling each other.
zw