https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98471
Bug ID: 98471
Summary: libstdc++ fails to build with clang on windows because
of filesystem bug
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: unlvsur at live dot com
Target Milestone: ---
Created attachment 49849
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49849&action=edit
working patch to fix the issue
#include<filesystem>
int main()
{
}
D:\hg\fast_io\.tmp>clang++ -o filesystem filesystem.cc -Ofast -std=c++20 -s
In file included from filesystem.cc:1:
In file included from D:\msys64\mingw64\include\c++\11.0.0\filesystem:45:
D:\msys64\mingw64\include\c++\11.0.0\bits/fs_path.h:252:15: error: invalid use
of incomplete type
'std::filesystem::filesystem_error'
throw filesystem_error(
^~~~~~~~~~~~~~~~~
D:\msys64\mingw64\include\c++\11.0.0\bits/fs_fwd.h:58:9: note: forward
declaration of
'std::filesystem::filesystem_error'
class filesystem_error;
^
In file included from filesystem.cc:1:
In file included from D:\msys64\mingw64\include\c++\11.0.0\filesystem:45:
D:\msys64\mingw64\include\c++\11.0.0\bits/fs_path.h:252:9: error: cannot throw
object of incomplete type
'std::filesystem::filesystem_error'
throw filesystem_error(
^ ~~~~~~~~~~~~~~~~~
D:\msys64\mingw64\include\c++\11.0.0\bits/fs_fwd.h:58:9: note: forward
declaration of
'std::filesystem::filesystem_error'
class filesystem_error;
^
2 errors generated.