Code to replace path separators on DOS-based filesystems is invalid
// On windows, the path might mix '/' and '\' separators. Replace the
// UNIX-like separators by MSDOS separators to make sure the path will resolve
// properly.
//
// Source: rustc compiler
// (https://github.com/rust-lang/rust/blob/9863bf51a52b8e61bcad312f81b5193d53099f9f/compiler/rustc_expand/src/module.rs#L174)
#if defined(HAVE_DOS_BASED_FILE_SYSTEM)
path.replace ('/', '\\');
#endif /* HAVE_DOS_BASED_FILE_SYSTEM */
this code is invalid, and throws an error about a lack of matching function. https://en.cppreference.com/w/cpp/string/basic_string/replace shows that indeed this is not a correct usage of the function, and that we should change it.
This is also mentioned in #2843 and can be replaced with a call to std::replace
Assigning this to myself because this has been fixed by a patch from a GCC contributor, which I need to tweak and push here as a PR
@CohenArthur any change on this ? We should have merged the patch by now
we should have but I forgot :grimacing: I'll try and take care of it
Fixed in #3164