Some bugs in lint

Benson Margulies benson at phantom.ksr.com
Thu Feb 25 01:00:49 AEST 1988


Here are two bugs and a perhaps bug in 4.3 lint, both demonstrated by
the following trivial source file:

t.c:

bcopy(b1, b2)
register char	*b1, *b2;
{
*(((long *)b2)++) = *((long *)b1)++;
}


lint t.c 

gives:

t.c:
t.c(4): illegal lhs of assignment operator
t.c(4): illegal lhs of assignment operator
bcopy: variable # of args.      t.c(3)  ::  llib-lc(189)
bcopy multiply declared t.c(3)  ::  llib-lc(189)
bcopy defined( t.c(3) ), but never used

Bug (1): that lhs is quite valid.

Bug (2): why two copies of the error message?

Bug? (3): to me, it seems wrong that lint reports duplicate definitions
against the library. At very least, there should be a /* SOMETHING */
to suppress this.

Benson I. Margulies                         Kendall Square Research Corp.
harvard!ksr!benson			    ksr!benson at harvard.harvard.edu



More information about the Comp.bugs.4bsd.ucb-fixes mailing list