Re: Is "register" generally ignored?

fjh@cs.mu.OZ.AU (Fergus Henderson)
9 Mar 2002 02:52:48 -0500

          From comp.compilers

Related articles
Is "register" generally ignored? smeyers@aristeia.com (Scott Meyers) (2002-02-28)
Re: Is "register" generally ignored? {spamtrap}@erewhon.demon.co.uk (Maneki Neko) (2002-03-09)
Re: Is "register" generally ignored? fjh@cs.mu.OZ.AU (2002-03-09)
Re: Is "register" generally ignored? rkrayhawk@aol.com (2002-03-09)
Re: Is "register" generally ignored? bear@sonic.net (Ray Dillinger) (2002-03-21)
| List of all articles for this month |

From: fjh@cs.mu.OZ.AU (Fergus Henderson)
Newsgroups: comp.compilers
Date: 9 Mar 2002 02:52:48 -0500
Organization: Computer Science, University of Melbourne
References: 02-02-067
Keywords: C, C++, optimize
Posted-Date: 09 Mar 2002 02:52:48 EST



Scott Meyers <smeyers@aristeia.com> writes:


>Is it reasonable to assume that contemporary C and C++
>compilers will ignore use of "register" when generating optimized code?


Yes.


>[I hope that compilers at least remember that register variables don't
>have addresses, so there's no aliasing problems. -John]


Compilers can easily determine which variables have not had their address
taken, even if those variables were not explicitly declared `register'.
Modern optimizing C and C++ compilers should certainly be expected to
do this.


--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.