Registers on the VAX 11/780?
Dave W. Smith
dws at tolerant.UUCP
Sat Jul 20 04:11:19 AEST 1985
> >>... but how many register variables can I declare in a function on
> >>the VAX 11/780?
>
> In probably all the PCC derived Vax C compilers, the number is 6,
> not 5.
A little known fact about PCC based C compilers is that you can recycle
registers with a function by using nested scopes. Example (for 11/780):
f()
{ register int foo; /* r11 */
{ register int bar; /* r10 */
...
}
{ register int baz; /* r10 */
...
}
}
--
David W. Smith {ucbvax}!tolerant!dws
Tolerant Systems, Inc.
408/946-5667
More information about the Comp.lang.c
mailing list