RE: [GD-General] C++ analyzers?
Brought to you by:
vexxed72
From: Jeff L. <je...@SP...> - 2002-07-18 23:16:31
|
> MSVC doesn't warm that: > > int i = 0; > > is an unused variable even if you don't use it anywhere. And Um, yes it does. Maybe wou don't have your warnings set high enough. That particular construct will generate a "variable initialised but never used" warning. > But you forget that "foo f" is still there. And it's gonna stay there > forever now =) One of the nicer aspects of ANSI C is that since there > aren't hidden operations like constructors, destructors, etc. then it > can be a lot more stringent about finding things like that. Re-read your compiler switches manual, especially the warning stuff. Our programmers all get really annoyed when they run a big compile, only to have it bitch at the last minute that "this variable was not used" - because we have warnings treated as errors, so it stops the whole shebang, rather than being an ignored warning. |