🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs
Article #91

lint bug

#91
From: utzoodecvaxharpoutah-csutah-grth...
Date: Sat, 26 Mar 1983 18:04
35 lines
1090 bytes
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);
    }
Technical Details
Message-ID: <bnews.utah-gr.748>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
From: utzoo!decvax!harpo!utah-cs!utah-gr!thomas
Newsgroups: net.bugs,net.lang.c
Title: lint bug
Article-I.D.: utah-gr.748
Posted: Sat Mar 26 18:04:44 1983
Received: Mon Mar 28 01:11:20 1983
Subject: lint bug
Date: Sat, 26 Mar 1983 18:04:44 +0000
Message-ID: <bnews.utah-gr.748>