lint bug(?)

Dave Decot decot at cwruecmp.UUCP
Wed Feb 8 07:01:01 AEST 1984

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 at rand-relay)

More information about the Comp.lang.c mailing list