gpt4 book ai didi

visual-c++ - 如何在 MSVC++ 中启用 6000 系列警告(代码分析警告)?

转载 作者:行者123 更新时间:2023-12-04 05:50:10 31 4
gpt4 key购买 nike

即使警告级别 4 和“所有警告”也不会使 6000 series出现警告。

最佳答案

实际上启用这些“代码分析”警告有它自己的对话框。

在您的项目属性中,您必须选中“在构建时启用代码分析”才能使其工作。

code analysis

此代码随后应显示错误 6246:

#include <stdio.h>

int main()
{
int x ;

{
int x = 6 ;
printf( "%d\n", x ) ;
}

}

warning C6246: Local declaration of 'x' hides declaration of the same name in outer scope.


此设置似乎完全独立于属性对话框中的“配置属性/C/C++/常规/警告级别”设置。

setting doesnt matter

关于visual-c++ - 如何在 MSVC++ 中启用 6000 系列警告(代码分析警告)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10163942/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com