Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!gamma!exodus!mhtsa!mh3bs!eagle!harpo!seismo!hao!hplabs!sri-unix!hartwell@shasta
From: hartwell%shasta@sri-unix.UUCP
Newsgroups: net.unix-wizards
Subject: Re: read(fd,&y,sizeof y)
Message-ID: <17552@sri-arpa.UUCP>
Date: Tue, 13-Mar-84 21:45:00 EST
Article-I.D.: sri-arpa.17552
Posted: Tue Mar 13 21:45:00 1984
Date-Received: Sun, 18-Mar-84 08:19:59 EST
Lines: 16

From:  Steve Hartwell 

I don't think this is non-portable.  For a machine which has pointers of more
than one width, the compiler can be expected to widen the shorter ones to
the width of the largest as it is pushed onto the argument list, just as
chars are promoted to ints when pushed.  The called function will know it's
stored that way and shorten it if it needs to before it's used.

So it doesn't matter what the type of "y" is in the read call is or what
the actual width of &y is.  It seems simple to me that there should be only
one width of a pointer on the argument stack [Not necessarily the width of
an int, either].

Steve Hartwell, Stanford University

p.s. this also speaks to the NULL vs. 0 vs. ((char *) 0) issue.