[Bug libstdc++/81751] __basic_file::sync() may flush _all_ files
bugzilla.volker at kabelmail dot de
gcc-bugzilla@gcc.gnu.org
Wed Aug 9 07:53:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81751
--- Comment #3 from Volker Wehrs <bugzilla.volker at kabelmail dot de> ---
Why is sync() (alias fflush()) called in sys_open(FILE*,...) at all?
1. It is not called in sys_open(int,...)
2. Both sys_open() functions are called in the constructor of stdio_filebuf
_only_.
So, as __basic_file seem to be intended as an internal class, maybe the call to
sync() can completely be omitted as there definitively is no open file.
More information about the Gcc-bugs
mailing list