GCC 和 MSVC 警告之间是否有任何良好的映射?例如。 -Wredundant-move on MSVC

Are there any good mappings between GCC and MSVC warnings? E.g. -Wredundant-move on MSVC

这个问题有点双重,一个比另一个更笼统。具体问题是; MSVC 是否具有与 -Wredundant-move 等效的警告?更一般地说,是否有在线任何地方(即使是某人的博客)在 GCC 和 MSVC 警告之间具有合理的映射?

我知道警告不需要跨平台相似,甚至根本不存在 - 这就是为什么我有兴趣找出是否存在任何合理的相关性?

对于一些背景知识,我希望在跨平台项目上启用特定的 -Werrors,并且希望每个平台都处理大致相同的警告而不是依赖于用户手动检查两个平台。

The specific question is; does MSVC have equivalent warnings to -Wredundant-move?

根据我的发现,不,MSVC 没有。

如果 gcc 和 MSVC 警告之间有良好的映射,这隐含地回答了更普遍的问题。

但是 - 对于您询问的特定类型的警告,未来看起来很有希望:
Under Review - Pessimizing Move Compiler Warning:

"LLVM supports a pessimizing-move compiler warning. In C++17 and newer, this fires when invoking std::move() on a temporary, this results in copy elision not occurring on the temporary. This seems a high value warning that is supported in Clang++ and GCC, but not MSVC."