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

From: Arch Robison (robison@kai.com)
Date: Fri Mar 24 2000 - 12:55:58 EST


> Does the C/C++ keyword "register" disable aliasing? Would it then
> be a good idea to use it frequently?

Regrettably not. In C, it means "you can't take the address of the variable".
But the fact that a variable's address was not taken is obvious.

In C++, "register" variables can have their address taken.

Except in very rare circumstances peculiar to a particular compiler,
there's never a reason to use the "register" keyword in C++.

Arch D. Robison Kuck & Associates Inc.
robison@kai.com 1906 Fox Drive
217-356-2288 ext. 56 Champaign IL 61820
Lead Developer for KAI C++ http://www.kai.com/C_plus_plus/index.html

--------------------- 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