Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: May too many register variables hurt? (was Re: Novice question.) Message-ID: <14538@smoke.brl.mil> Date: 20 Nov 90 17:42:01 GMT References: <965@demott.COM> <11476@j.cc.purdue.edu> <967@mwtech.UUCP> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 13 In article <967@mwtech.UUCP> martin@mwtech.UUCP (Martin Weitzel) writes: >In general, my advice is to use no more than two register variables, and >only in the *outmost* blocklevel in the body of any function. Mine is the opposite. >The order in which the variables are declared is a-b-c, so c will not >profit from its storage class. Sure it will. Since b and c are declared in separate parallel blocks, older-technology compilers such as PCC will share the explicit register that is assigned for these two variables. This is in fact a good way to exploit "register" in such compilers.