This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/85247] New: Filesystem filename() wrong result for host-like path


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85247

            Bug ID: 85247
           Summary: Filesystem filename() wrong result for host-like path
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ixsci at yandex dot ru
  Target Milestone: ---

Here is a small example which is using a host-like path:

#include <iostream>
#include <filesystem>
namespace fs = std::filesystem;

int main()
{
    std::cout << fs::path("//host").filename() << '\n';
}

Which according to the Standard ([fs.path.decompose]p7) should display "" but
it displays "host" instead. Tested on Wandbox with gcc HEAD.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]