lint bug(?)

Archie Lachner archiel at teklds.UUCP
Wed Jan 11 08:20:04 AEST 1984


The following simple function illustrates a problem I am having with lint:

	union foo {
		int		*intptr;
		char	*chrptr;
		float	*fltptr;
	};
	test()
	{
		register union foo	reg;
	
		*(reg.intptr) = 1;
		return;
	}

This compiles with no complaints from cc.  However, I get the following
message from lint:

	test.c:
	test.c(10): can't take & of reg

While it is true that the address of a register cannot be computed, such
a computation should not be necessary during the execution of the above
code.  Does this look like a bug in lint?  Does anybody out there in net
land have any ideas or suggestions?
-- 

				Archie Lachner

uucp:    {ucbvax,decvax,pur-ee,cbosg,ihnss}!tektronix!teklds!archiel
CSnet:   archiel at tek
ARPAnet: archiel.tek at rand-relay



More information about the Comp.lang.c mailing list