unreachable code

ritesh2190

Member
Joined
Jun 7, 2011
Messages
15
Programming Experience
1-3
i have to write a vb.net program which checks if there is some unreachable code in a c program which we take as an input,any idea how to go about??
is there any built in function which does that?
 
Of course there's nothing built in to do it. VB.NET knows nothing about C code so there's nothing built in to do anything relating to C code. What you would need to do is built a tree of the routes that execution could possibly take through the code based on branching and if there is any code that isn't included in that tree then it is unreachable.
 
Hi. ritesh you are REPOSTING the same(ish) question. Please refer to your original post for more questions and answers.

I answered part of this in your post: http://www.vbdotnetforums.com/vs-net-general-discussion/48270-analyzing-c-program.html#post136166

To expand, Your asking a lot - a great deal - for a help forum. They can guide you with snippets, but its gotta be mostly self learnt.
Personally I think you are trying to re-invent the wheel - here is a good place to start for checking 'c' problems.

http://en.wikipedia.org/wiki/Lint_(software)

T
here are plenty of open source ones.
List of tools for static code analysis - Wikipedia, the free encyclopedia
 
Back
Top