https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98001
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- I don't think we actually need fflush(__file) to set errno in order to verify that the library doesn't set it to zero. So this should be fine: --- a/libstdc++-v3/testsuite/ext/stdio_filebuf/char/79820.cc +++ b/libstdc++-v3/testsuite/ext/stdio_filebuf/char/79820.cc @@ -26,10 +26,10 @@ void test01() { FILE* f = std::fopen("79820.txt", "w"); - std::fclose(f); errno = 127; __gnu_cxx::stdio_filebuf<char> b(f, std::ios::out, BUFSIZ); VERIFY(errno == 127); // PR libstdc++/79820 + std::fclose(f); } int