[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-09-13 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 --- Comment #13 from Aldy Hernandez --- Author: aldyh Date: Wed Sep 13 16:43:11 2017 New Revision: 252358 URL: https://gcc.gnu.org/viewcvs?rev=252358=gcc=rev Log: PR libstdc++/81751 don't call fflush(NULL) PR libstdc++/79820 PR

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-09-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 Jonathan Wakely changed: What|Removed |Added Target Milestone|8.0 |5.5 --- Comment #12 from Jonathan

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-09-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 --- Comment #11 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 17:09:05 2017 New Revision: 251680 URL: https://gcc.gnu.org/viewcvs?rev=251680=gcc=rev Log: PR libstdc++/81751 don't call fflush(NULL) Backport from mainline 2017-08-09

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-09-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 --- Comment #10 from Jonathan Wakely --- Author: redi Date: Mon Sep 4 16:52:30 2017 New Revision: 251676 URL: https://gcc.gnu.org/viewcvs?rev=251676=gcc=rev Log: PR libstdc++/81751 don't call fflush(NULL) Backport from mainline 2017-08-09

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-08-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 --- Comment #12 from Jonathan Wakely --- I was wrong, and that code path is used by std::sync_with_stdio(false) when we reset cin, cout, cerr and clog to use stdio_filebuf stream buffers. So there's no need for a testcase.

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-08-14 Thread m-ou...@m-ou.se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 --- Comment #11 from Maurice Bos --- (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? > >

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-08-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 Jonathan Wakely changed: What|Removed |Added Known to work||7.2.1, 8.0 Target Milestone|8.0

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-08-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 --- Comment #10 from Jonathan Wakely --- Author: redi Date: Mon Aug 14 12:14:09 2017 New Revision: 251090 URL: https://gcc.gnu.org/viewcvs?rev=251090=gcc=rev Log: PR libstdc++/81751 don't call fflush(NULL) Backport from mainline 2017-08-09

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-08-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 Jonathan Wakely changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-08-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 --- Comment #8 from Jonathan Wakely --- Author: redi Date: Wed Aug 9 17:52:10 2017 New Revision: 250993 URL: https://gcc.gnu.org/viewcvs?rev=250993=gcc=rev Log: PR libstdc++/81751 don't call fflush(NULL) PR libstdc++/79820 PR

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 --- Comment #7 from Jonathan Wakely --- 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

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-03-14 Thread i.nixman at autistici dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 --- Comment #6 from niXman --- Created attachment 40970 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40970=edit patch done.

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-03-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 --- Comment #5 from Jonathan Wakely --- Sorry, I was looking at gcc-6-branch which sets errno=0 in close(), but I removed that on trunk for PR 65411.

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-03-13 Thread i.nixman at autistici dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 --- Comment #4 from niXman --- (In reply to Jonathan Wakely from comment #3) > and it also needs to be done on line 275. why? line 275: https://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/config/io/basic_file_stdio.cc?view=markup#l275

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-03-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 --- Comment #3 from Jonathan Wakely --- Comment on attachment 40966 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40966 patch It's quite possible that "errno" is a macro for something called "__errno" on some systems, so this would fail

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-03-13 Thread i.nixman at autistici dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 --- Comment #2 from niXman --- Created attachment 40966 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40966=edit patch

[Bug libstdc++/79820] std::ifstream sets errno to zero

2017-03-02 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79820 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|