GCC和MSVC警告之间是否有任何良好的映射?例如 - MSVC上的wredlaction -move
这个问题有点两折,一个比另一个更一般。具体的问题是; MSVC是否有等效的警告-Wredeartion-Move
?更一般而言,即使是某人的博客,在网上是否可以在任何地方都有合理的GCC和MSVC警告映射?
我知道警告不需要任何类似的累积平台,甚至根本存在 - 这就是为什么我有兴趣找出是否存在任何合理的相关性?
对于一小部分背景,我希望在跨平台项目上启用特定的-werror
s,并且希望每个平台都会照顾大致相同的警告,而不是依靠用户来手动检查两个平台。
This question is somewhat two fold, one being more general than the other. The specific question is; does MSVC have equivalent warnings to -Wredundant-move
? More generally, is there anywhere online, even if it's someone's blog, that has a reasonable mapping between GCC and MSVC warnings?
I'm aware that warnings don't have any requirement to be similar accross platforms, or even exist at all - that's why I'm interested to find out if there is any reasonable correlation?
For a small bit of background, I'm looking to enable specific -Werror
s on a cross-platform project, and would prefer if each platform looked after roughly the same warnings instead of relying on the user to check on both platforms manually.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从我发现的情况下,不,MSVC没有。
如果GCC和MSVC警告之间有很好的映射,这隐含地回答了更普遍的问题。
但是 - 对于您问的特定警告,未来看起来很有希望:
在审查中 - 悲伤的移动编译器警告:
From what I've found, no, MSVC doesn't.
This implicitly answers the more general question if there's a good mapping between gcc and MSVC warnings.
But - the future looks promising for the particular kind of warning you asked about:
Under Review - Pessimizing Move Compiler Warning: