In the ruby world there is the "mutant" ( https://github.com/mbj/mutant ) gem that does stuff like this automatically.
It runs your tests and makes sure they all pass then it mutates the code under test (changing a == b to a != b or a <= 10 to a < 10) and makes sure that at least one of your tests fails.
If your tests still pass after the mutation then you know you are not covering something.
Tis a great idea but making a C version with the equivalent functionality would be a lot harder I think.
Curious why you're thinking doing this in C would be a lot harder? All you really need to do is define what some valid transformations are. There are existing mutation testing tools for C[1].
It runs your tests and makes sure they all pass then it mutates the code under test (changing a == b to a != b or a <= 10 to a < 10) and makes sure that at least one of your tests fails.
If your tests still pass after the mutation then you know you are not covering something.
Tis a great idea but making a C version with the equivalent functionality would be a lot harder I think.