Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 beta 3/9/83; site cwruecmp.UUCP
Path: utzoo!linus!decvax!cwruecmp!decot
From: decot@cwruecmp.UUCP (Dave Decot)
Newsgroups: net.lang.c
Subject: Re: lint bug(?)
Message-ID: <952@cwruecmp.UUCP>
Date: Tue, 7-Feb-84 16:01:01 EST
Article-I.D.: cwruecmp.952
Posted: Tue Feb  7 16:01:01 1984
Date-Received: Thu, 9-Feb-84 22:12:50 EST
References: <96@teklds.UUCP>
Organization: CWRU Computer Engr. Cleveland, Ohio
Lines: 11

You are right, this is a bug.  Pcc (and thus lint) probably understands union
and struct members by substituting *((char*)(&str)+memboff) for str.memb,
where memboff is the byte offset of member memb into template str.  Note that
the offsets of members of unions is always zero, so this problem should not
occur.  Most compilers will not take advantage of the "hint" to put unions or
structs into registers anyway, because this greatly complicates code generation.
However, it is still illegal to ask for the address of anything declared to
have storage class "register", whether or not one is actually used.

Dave Decot		 "Non-Americans are people, too."
decvax!cwruecmp!decot    (Decot.Case@rand-relay)