I want to use Splint to detect implicit casts between typedef
s with the same underlying type, such as in the following code:
typedef int counter;
typedef int delta;
static int func(int a, int b, int c)
{
return a + b + c;
}
int main(void)
{
int a = 5;
counter b = a;
delta c = (int) 8;
return func(a, b, c);
}
It looks like I can use Splint for this, but it doesn't produce any warnings. Even annotating both typedef
s as abstract
doesn't trigger it.
How do I get Splint to do "strong" type checking like this?