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 libstdc++-v3/ChangeLog: PR libstdc++/99876 * src/c++17/fs_ops.cc (fs::absolute): Call non-throwing form, to avoid unnecessary current_path() call. Tested powerpc64le-linux. Committed to trunk. I'll backport to gcc-10 and gcc-11 too.