This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: pure and const functions
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Mark Dettinger <mdetting at yahoo dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Fri, 26 Apr 2002 19:03:03 +0100 (BST)
- Subject: Re: pure and const functions
On Fri, 26 Apr 2002, Mark Dettinger wrote:
> A function is "pure", if it only examines its arguments, i.e. does not
> read global memory and does not take input from any device. In other
> words, if its behavior does not depend on the context.
Pure functions are pure functions of *the whole state of the machine*
(including global memory).
http://gcc.gnu.org/ml/gcc-patches/1999-08/msg00588.html
--
Joseph S. Myers
jsm28@cam.ac.uk