Available No. of Registers
Alan J Rosenthal
flaps at utcsri.UUCP
Sat Feb 14 16:19:57 AEST 1987
In article <873 at celerity.UUCP> jjw at 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 at csri.toronto.edu
CSNET: flaps at toronto
BITNET: flaps at utorgpu
More information about the Comp.lang.c
mailing list