Is there a free tool (some kind of a static checker) that does typedef-based type-checking for a plain C (not C++) and runs on Linux (or any kind of free Unix)? I am aware of a commercial one: PC-lint/FlexeLint. It does exactly what I want, but it's not free and Windows-only. Here is an example from it's manual:
typedef int Count;
typedef int Bool;
Count n;
Bool stop;
.
.
.
n = stop ; // tool generates a warning here
I've already read this http://stackoverflow.com/questions/376452/enforce-strong-type-checking-in-c-type-strictness-for-typedefs and this http://stackoverflow.com/questions/3140035/is-there-a-good-way-to-force-type-incompatibility-in-c and I'm aware of the struct encapsulation hack, but that's not what I want. I have a pile of code and I want to check it for this particular type of mistakes.