Consider a large project where many typedef 'd types, for example
typedef int age; typedef int height;
and some functions that take arguments of these types:
void printPerson(age a, height h) { printf("Age %d, Height %d\n", a, h); }
Is there a way to warn at compile time if these arguments are of the wrong type, for example.
age a = 30; height h = 180; printPerson(h, a);
Is there a gcc way (or some kind of static code analysis tool) in such cases?
c gcc
urzeit
source share