Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!lll-winken!arisia!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: Addresses of parameters Message-ID: <616@quintus.UUCP> Date: 2 Nov 88 02:50:19 GMT Article-I.D.: quintus.616 References: <35620@XAIT.Xerox.COM> <10124@haddock.ima.isc.com> <35664@XAIT.Xerox.COM> <29781@think.UUCP> <1013@teorix.liu.se> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 12 In article <1013@teorix.liu.se> pausv@teorix.liu.se (Paul Svensson) writes: >Yes, I agree with Barry that taking tha address of a parameter is not >very useful, but that is NOT a good reason for not allowing it. >There are other good reasons, such as making it easier to pass arguments >in registers, for example. ... To allow "&" to work on parameters >is essentially the same as to allow it to work on register variables, All the compiler has to do if it sees & applied to an argument is to spill that argument to memory and use the in-memory version. Most of the RISC machines I've looked at adopt a convention where non-scalar and "excess" arguments are passed in a block on the stack, and gaps are left for the arguments which are assigned to registers, so each argument- in-a-register has a slot reserved for it in memory anyway.