Will the real lint please stand up?

Gerry Wiener wiener at stout.ucar.edu
Sun Feb 12 03:42:13 AEST 1989


Here is a problem I ran into with lint.  There are two files below, junk.c
and junk1.c.  Try

lint junk.c junk1.c

and

lint junk1.c junk.c

Notice that the output disagrees.  Will the real lint please stand up?


-----
	Gerry Wiener	(303)497-8790  Email:gerry at toadwar.ucar.edu
	NCAR
	P.O. Box 3000
	Boulder, Co
	80307-3000

#	This is a shell archive.
#	Remove everything above and including the cut line.
#	Then run the rest of the file through sh.
#----cut here-----cut here-----cut here-----cut here----#
#!/bin/sh
# shar:	Shell Archiver
#	Run the following text with /bin/sh to create:
#	junk.c
#	junk1.c
# This archive created: Sat Feb 11 10:28:22 1989
cat << \SHAR_EOF > junk.c

static int (*hello)();

main()
{
  hello1();
  hello();
}

substitute(fhello)
     int (*fhello)();
     
{
  hello = fhello;
}
SHAR_EOF
cat << \SHAR_EOF > junk1.c

int hello()
{
  printf("hello\n");
}


hello1()
{
  substitute(hello);
  printf("hello again\n");
}
SHAR_EOF
#	End of shell archive
exit 0



More information about the Comp.lang.c mailing list