https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91012
Bug ID: 91012 Summary: filesystem_error no longer includes error_code message Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: bhalevy at gmail dot com CC: redi at gcc dot gnu.org Target Milestone: --- std::filesystem::filesystem_error::what() changed in version 9 as follows. test_fse.cc: #include <iostream> #include <system_error> #include <filesystem> int main() { auto fse = std::filesystem::filesystem_error("op failed", std::error_code(13, std::system_category())); std::cout << "filesystem_error: " << fse.what() << '\n'; } compile options: g++ -std=c++17 -o test_fse test_fse.cc -lstdc++fs Previously, with libstd++fs version 8, the output looks like this: filesystem_error: filesystem error: op failed: Permission denied Now, with libstd++fs version 9: filesystem_error: filesystem error: op failed I think the culprit is commit 8092d42a27bb2a8c45d8219b95532e92ffa152ac "PR libstdc++/83306 make filesystem_error no-throw copyable" Therefore adding Jonathan to the Cc.