Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site utcsri.UUCP Path: utzoo!utcsri!flaps From: flaps@utcsri.UUCP (Alan J Rosenthal) Newsgroups: comp.lang.c Subject: Re: Available No. of Registers Message-ID: <4141@utcsri.UUCP> Date: Sat, 14-Feb-87 01:19:57 EST Article-I.D.: utcsri.4141 Posted: Sat Feb 14 01:19:57 1987 Date-Received: Sat, 14-Feb-87 02:35:51 EST References: <3950004@nucsrl.UUCP> <83@ucdavis.UUCP> <2250@jade.BERKELEY.EDU> <805@celerity.UUCP> <12982@sun.uucp> <873@celerity.UUCP> Reply-To: flaps@utcsri.UUCP (Alan J Rosenthal) Organization: University of Toronto Lines: 33 Summary: In article <873@celerity.UUCP> jjw@celerity.UUCP (Jim (JJ) Whelan) writes: >K&R's suggestion that the register variables are assigned to registers in >order of appearance solves my problem -- I just put the variables in order >of importance and let the compilers handle it from there. Unfortunately, this is not sufficient in the case of register formals. Consider something like: f(n) register int n; { register int i; where it is considered more useful to put 'i' in a register than 'n'. It is not possible to arrange the declarations in the appropriate order, and f(nformal) int nformal; { register int i,n = nformal; , which is often recommended, wastes an int on all machines. -- Alan J Rosenthal UUCP: {backbone}!seismo!mnetor!utgpu!flaps, ubc-vision!utai!utgpu!flaps, or utzoo!utgpu!flaps (among other possibilities) ARPA: flaps@csri.toronto.edu CSNET: flaps@toronto BITNET: flaps at utorgpu