[net.bugs] lint bug

thomas (03/27/83)

There is a very annoying bug in lint.  Given the two input files shown
below, lint produces the error messages

    b, arg. 1 used inconsistently	tst2.c(8)  ::  tst1.c(7)
    b, arg. 2 used inconsistently	tst2.c(8)  ::  tst1.c(7)
    a, arg. 1 used inconsistently	tst1.c(5)  ::  tst2.c(10)

Seems that even though the type foo is declared to be a struct foo in
both files, the fact that struct foo is actually defined in one file
but not the other causes lint to think that the arguments are of
differing types.  Anybody know a fix for this?

=Spencer

tst1.c:
    typedef struct foo foo;

    a(f)
    foo * f;
    {
	foo * g = (foo *)0;
	b(f, g);
    }

tst2.c:
    typedef struct foo {
	int a;
    } foo;

    b(f, g)
    foo * f, * g;
    {
	f = g;
	a(f);
    }