https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83626
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Thu Jan 4 22:58:59 2018 New Revision: 256269 URL: https://gcc.gnu.org/viewcvs?rev=256269&root=gcc&view=rev Log: PR libstdc++/83626 Don't throw for remove("") and remove_all("") PR libstdc++/83626 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove redundant call to ec.clear(). (remove_all(const path&, error_code&))): Do not return an error for non-existent paths. * src/filesystem/std-ops.cc: Likewise. * testsuite/27_io/filesystem/operations/remove.cc: New test. * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected results for non-existent paths. * testsuite/experimental/filesystem/operations/remove.cc: New test. * testsuite/experimental/filesystem/operations/remove_all.cc: Fix expected results for non-existent paths. Added: trunk/libstdc++-v3/testsuite/27_io/filesystem/operations/remove.cc - copied, changed from r256243, trunk/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc trunk/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc - copied, changed from r256243, trunk/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/src/filesystem/ops.cc trunk/libstdc++-v3/src/filesystem/std-ops.cc trunk/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc trunk/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc