read(fd,&y,sizeof y)

pb%camjenny at ucl-cs.arpa pb%camjenny at ucl-cs.arpa
Thu Mar 15 23:58:18 AEST 1984


From:  Piete Brooks <pb%camjenny at ucl-cs.arpa>

Consider the case of a WORD addressed machine, such as the PERQ.
It encodes BYTE pointers specially, shifting them left.
Thus the WORD pointer for an object and it's BYTE pointer are NOT the same.
As the compiler does not know that read expects a BYTE pointer, when given a
WORD pointer, it will not CAST it for you, unless you EXPLICITLY tell it to.
 
It does keep one on one's toes ..........



More information about the Comp.unix.wizards mailing list