Is there an equivalent of gcc's -Wshadow in visual C++

后端 未结 5 1942
被撕碎了的回忆
被撕碎了的回忆 2020-12-17 09:50

-Wshadow will \"Warn whenever a local variable shadows another local variable.\". Is there an equivalent in Visual C++ (2008)? I tried /W4 but it didn\'t pick up on it. I al

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-17 10:30

    There's no warning about this that's disabled by default, so if you're not seeing the warning at the default levels, I'd say it can't be done. (Which is lame.)

提交回复
热议问题