This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/79820] std::ifstream sets errno to zero
- From: "m-ou dot se at m-ou dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 Aug 2017 13:24:25 +0000
- Subject: [Bug libstdc++/79820] std::ifstream sets errno to zero
- Auto-submitted: auto-generated
- References: <bug-79820-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820
--- Comment #11 from Maurice Bos <m-ou.se@m-ou.se> ---
(In reply to Jonathan Wakely from comment #7)
> The bug title says std::ifstream sets errno to zero, but it should never run
> stdio_filebuf::sys_open. Do you have a testcase for this?
>
> We should still fix it even if it only affects a non-standard extension, but
> it's probably not worth backporting if it doesn't affect std::ifstream.
I encountered it while using the Catch test framework. Found it with a
watchpoint with gdb. Didn't fully inspect the backtrace. It might use some
non-standard extensions. I'll check!