Searching for a program that can take a number of c files that form a project and perform certain analysis on them. For example, to parse the files and produce the following:
What variables (which includes structure/union members) are used, and where.
What variables (which includes structure/union members) are unused.
And also, which are assigned values, but the vales are not actually used.
The program is expected to work on standard ANSI C programming files.
Does such a program exist? The first part (which variables are used, and where) is partly provided by the compilers output of a map file, but from this it is difficult to obtain the second part, and also impossible to obtain the third.