https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99876
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:07b990ee23e0c7a92d362dbb25fd5d57d95eb8be commit r12-3198-g07b990ee23e0c7a92d362dbb25fd5d57d95eb8be Author: Jonathan Wakely <jwak...@redhat.com> Date: Fri Aug 27 10:59:54 2021 +0100 libstdc++: Fix inefficiency in filesystem::absolute [PR99876] When the path is already absolute, the call to current_path() is wasteful, because operator/ will ignore the left operand anyway. Signed-off-by: Jonathan Wakely <jwak...@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/99876 * src/c++17/fs_ops.cc (fs::absolute): Call non-throwing form, to avoid unnecessary current_path() call.