Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!gatech!lll-lcc!seismo!mimsy!chris From: chris@mimsy.UUCP Newsgroups: comp.lang.c Subject: Re: Order of registers Message-ID: <5485@mimsy.UUCP> Date: Wed, 18-Feb-87 02:52:56 EST Article-I.D.: mimsy.5485 Posted: Wed Feb 18 02:52:56 1987 Date-Received: Thu, 19-Feb-87 06:49:01 EST References: <3950004@nucsrl.UUCP> <83@ucdavis.UUCP> <2250@jade.BERKELEY.EDU> <195@batcomputer.tn.cornell.edu> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 24 >In article <4141@utcsri.UUCP> flaps@utcsri.UUCP (Alan J Rosenthal) writes: >> f(nf) int nformal; { register int n = nformal; >>, which is often recommended, wastes an int on all machines. Not all! In article <195@batcomputer.tn.cornell.edu> braner@batcomputer.tn.cornell.edu (braner) writes: >"Wastes an int"??? - nformal is on the stack anyway, Is it? (Have a care with that answer! Try some different compilers on some different architectures.) >I support the K&R method of the compiler following the programmer's >order until registers are used up. After all, C is supposed to give >the programmer as much control of the machine as possible. I would not put it that way. Say rather that C is not supposed to obstruct control of the machine. On conventional (PDP-like) machines, with conventional (straightforward, unoptimising) compilers, this does seem to be the best thing to do with `register' declarations. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) UUCP: seismo!mimsy!chris ARPA/CSNet: chris@mimsy.umd.edu