--- Comment #2 from Jonathan Wakely <redi at gcc dot> ---
The current __basic_file::sys_open behaviour came from the PR 17215 fix
(r86756). Before that change we called sync() after doing _M_cfile=__file, but
after we call sync() while it's still null.

I think rather than changing sync(), the correct fix is to not call it while
_M_cfile is null. Instead we should directly call fflush(__file) in sys_open.
That should restore the behaviour that was present before GCC 3.4.4

Reply via email to