This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]