[Bug libstdc++/108636] C++20 undefined reference to `std::filesystem::__cxx11::path::_List::type(std::filesystem::__cxx11::path::_Type)' with -fkeep-inline-functions

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 2 13:25:59 GMT 2023


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Trunk has some additional errors:

/usr/bin/ld: /tmp/ccXeUWH9.o: in function
`std::filesystem::__cxx11::directory_iterator::operator==(std::default_sentinel_t)
const':
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/fs_dir.h:436:
undefined reference to `std::__shared_ptr<std::filesystem::__cxx11::_Dir,
(__gnu_cxx::_Lock_policy)2>::operator bool() const'
/usr/bin/ld: /tmp/ccXeUWH9.o: in function
`std::filesystem::__cxx11::recursive_directory_iterator::operator==(std::default_sentinel_t)
const':
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/fs_dir.h:544:
undefined reference to
`std::__shared_ptr<std::filesystem::__cxx11::recursive_directory_iterator::_Dir_stack,
(__gnu_cxx::_Lock_policy)2>::operator bool() const'


I think the answer is "don't use -fkeep-inline-functions"


More information about the Gcc-bugs mailing list