[Bug libstdc++/104454] filesystem::canonical needs to strip trailing slash

2025-05-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104454 --- Comment #6 from Jonathan Wakely --- See also https://lists.gnu.org/archive/html/bug-make/2025-05/msg2.html

[Bug libstdc++/104454] filesystem::canonical needs to strip trailing slash

2025-05-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104454 --- Comment #5 from Jonathan Wakely --- I did try this: --- a/libstdc++-v3/src/c++17/fs_ops.cc +++ b/libstdc++-v3/src/c++17/fs_ops.cc @@ -164,6 +164,21 @@ fs::canonical(const path& p, error_code& ec) path result; #ifdef _GLIBCXX_FILESYSTEM_

[Bug libstdc++/104454] filesystem::canonical needs to strip trailing slash

2025-05-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104454 --- Comment #4 from Jonathan Wakely --- Actually that's wrong because path("foo/bar/..").lexically_normal() is just "foo" which ignores whether foo/bar is a symlink to somewhere else. I think the right fix is to just not define _GLIBCXX_USE_REA

[Bug libstdc++/104454] filesystem::canonical needs to strip trailing slash

2025-05-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104454 --- Comment #3 from Jonathan Wakely --- This fixes the FAIL for 27_io/filesystem/operations/weakly_canonical.cc --- a/libstdc++-v3/src/c++17/fs_ops.cc +++ b/libstdc++-v3/src/c++17/fs_ops.cc @@ -162,7 +162,7 @@ fs::path fs::canonical(const path

[Bug libstdc++/104454] filesystem::canonical needs to strip trailing slash

2025-05-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104454 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug libstdc++/104454] filesystem::canonical needs to strip trailing slash

2022-02-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104454 Jonathan Wakely changed: What|Removed |Added Target||powerpc-ibm-aix7.2.0.0