Re: OON: Aliasing (was: Comparison between Fortran & C++)

From: Andrew Reilly (a.reilly@lake.com.au)
Date: Sat Mar 25 2000 - 07:02:18 EST


On Fri, Mar 24, 2000 at 09:37:05AM -0500, Oliver Axel Ruebenacker wrote:
> Does the C/C++ keyword "register" disable aliasing? Would it then
> be a good idea to use it frequently?

It should, but I've heard a pretty convincing argument that
wherever you could use register (i.e., local scalars), a modern
compiler can figure out that it isn't aliased all by itself, so
it doesn't gain you anything.

However, you _can_ tell the compiler to operate as though some
aliasing wasn't present by explicitly using local temporaries,
rather than operating on array elements.

-- 
Andrew

--------------------- Object Oriented Numerics List -------------------------- * To subscribe/unsubscribe: use the handy web form at http://oonumerics.org/oon/ * If this doesn't work, please send a note to owner-oon-list@oonumerics.org



This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:11 EST