More specifically, what I am looking for is a program that will read through my source code file and find any unused variables, unmatched 'new's, and unoptimized loops.
Thank you.
More specifically, what I am looking for is a program that will read through my source code file and find any unused variables, unmatched 'new's, and unoptimized loops.
Thank you.
For which OS/Compiler?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
There should be a button that just submits that replyOriginally Posted by Salem
Lithorien: your compiler is probably capable of many of those things if you turn the right flags on.
>what I am looking for is a program that will read through my
>source code file and find any unused variables,
>unmatched 'new's, and unoptimized loops.
Post your program here.
My best code is written with the delete key.
That's a good idea for a programming challenge...
Make a program analyzer.
nerds unite!
I'm using windows XP.
I'm using dev-C++ by bloodshed.
You'll probably have to turn on optimization to catch this type of stuff. Also, can you explain what you mean by unmatched 'new'? There a memory checkers that can find memory leaks.More specifically, what I am looking for is a program that will read through my source code file and find any unused variables
> unused variables,
lint - http://www.gimpel.com
splint - http://www.splint.org
source navigator - http://sourcenav.sourceforge.net/
> unmatched 'new's,
Any leak detector, say
Valgrind
Electric fence
bounds checker
> and unoptimized loops.
Use a profiler or test coverage
gprof and gcov, available with gcc.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Sorry, Salem.Originally Posted by Salem
Windows 2003 Small Business Server, and the compiler's in my sig (Visual C++ 2003).
I've looked through the flag list of my compiler, and it doesn't appear to be able to show me those two specific things.Originally Posted by Perspective
Thanks for the idea though.
If you really want me to..Originally Posted by Prelude
Editor.cpp
Thank you, thank you, thank you!Originally Posted by Salem
4 replies in a row in 7 minutes! No way!!