This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/25653] Documentation bug in ext/stdio_filebuf.h
- From: "rleigh at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jan 2006 20:52:31 -0000
- Subject: [Bug libstdc++/25653] Documentation bug in ext/stdio_filebuf.h
- References: <bug-25653-7852@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rleigh at debian dot org 2006-01-03 20:52 -------
On further investigation, it looks like when a stdio_filebuf is destroyed, this
will ultimately invoke __basic_file<char>::close(). This calls fclose(). If
an fd is used, fdopen() is called to create a __c_file*.
If this is correct, then both file descriptors and FILE * objects will be
automatically closed, in which case this patch is needed:
--- stdio_filebuf.h.old 2006-01-03 18:49:58.653951737 +0000
+++ stdio_filebuf.h 2006-01-03 20:51:22.146153499 +0000
@@ -85,7 +85,7 @@
* Defaults to system's @c BUFSIZ.
*
* This constructor associates a file stream buffer with an open
- * C @c FILE*. The @c FILE* will not be automatically closed when the
+ * C @c FILE*. The @c FILE* will be automatically closed when the
* stdio_filebuf is closed/destroyed.
*/
stdio_filebuf(std::__c_file* __f, std::ios_base::openmode __mode,
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25653