Search code examples
mingw-w64

MinGW-w64 8.1.0 rev 0 doesn't compile when including <filesystem>


2 days ago, I was excited to note that MinGW-w64 released its gcc 8.1.0, revision 0. Unfortunately, a simple program

#include <filesystem>
int main() {}

does not compile. It results in a bunch of errors inside <filesystem>, starting with

C:/MinGW/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/bits/fs_path.h: In member function 'std::filesystem::__cxx11::path& std::filesystem::__cxx11::path::operator/=(const std::filesystem::__cxx11::path&)':
C:/MinGW/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/bits/fs_path.h:237:47: error: no match for 'operator!=' (operand types are 'std::filesystem::__cxx11::path' and 'std::filesystem::__cxx11::path')
|| (__p.has_root_name() && __p.root_name() != root_name()))
                           ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~

Who's to blame for that? Or better, to whom is that error to report?


Solution

  • This problem could be due to the gcc distribution (mingw-w64) or to the compiler itself (gcc).

    As first, more likely hypothesis I think it could be an issue of the distribution, so I have just added it as a bug to the sourceforge website of mingw-w64.

    https://sourceforge.net/p/mingw-w64/bugs/737/

    If they find that's a problem of gcc, this could be readdressed to the compiler website (gcc.gnu.org).

    Let's wait and see what they answer on sourceforge.

    Marco