https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122726
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Jonathan Wakely <[email protected]>: https://gcc.gnu.org/g:19da7880d50eee3ae8f71c353871af961e8ca801 commit r14-12167-g19da7880d50eee3ae8f71c353871af961e8ca801 Author: Jonathan Wakely <[email protected]> Date: Mon Nov 17 21:01:33 2025 +0000 libstdc++: Fix error reporting for filesystem::rename on Windows [PR122726] Use the __last_system_error() function and the system_category to convert the Windows error to a generic one. libstdc++-v3/ChangeLog: PR libstdc++/122726 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (rename): Use __last_system_error to set errno accurately. * testsuite/27_io/filesystem/operations/rename.cc: Test error_code matches errc::no_such_file_or_directory. (cherry picked from commit 77278e0292cd23f0d1ddbb5e6e18064e119bdd6f)
