https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122726
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Jonathan Wakely <[email protected]>: https://gcc.gnu.org/g:d207ebcb5f728eca944e1f19401643b01d5e43f5 commit r15-10526-gd207ebcb5f728eca944e1f19401643b01d5e43f5 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)
