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

            Bug ID: 89986
           Summary: [9 Regression] missing export for
                    directory_iterator::increment
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: link-failure
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

#include <filesystem>

int main()
{
  std::error_code ec;
  std::filesystem::directory_iterator it("/", ec);
  it.increment(ec);
}

Using GCC 8 and linking to libstdc++fs.a this works, but using GCC 9 it
doesn't:

/usr/bin/ld: /tmp/ccC5CJow.o: in function `main':
/tmp/dir.cc:7: undefined reference to
`std::filesystem::__cxx11::directory_iterator::increment(std::error_code&)'
collect2: error: ld returned 1 exit status


I forgot to export that symbol after moving the definitions to libstdc++.so
(and apparently never tested it!)

Reply via email to