Actually enabling these "Code Analysis" warnings has it's own dialog.
In your project properties, you must check "Enable Code Analysis on Build" to make it work.
![code analysis](https://i.stack.imgur.com/zga7k.png)
This code should then show error 6246:
#include <stdio.h>
int main()
{
int x ;
{
int x = 6 ;
printf( "%d
", x ) ;
}
}
warning C6246: Local declaration of 'x' hides declaration of the same name in outer scope.
This setting appears to be completely independent of the "Configuration Properties/C/C++/General/Warning Level" setting in the properties dialog.
![setting doesnt matter](https://i.stack.imgur.com/XLL8H.png)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…