Fwd: Functional Purity

2008-11-29 Thread Brendon Costa
Forgot to reply all... -- Forwarded message -- From: Brendon Costa <[EMAIL PROTECTED]> Date: 2008/11/30 Subject: Re: Functional Purity To: David Fang <[EMAIL PROTECTED]> >Sounds like you want to (at least): > > 1) automatically qualify every d

Re: Functional Purity

2008-11-29 Thread Eric Botcazou
> The reason for posting this is to ask. Is there code in GCC that > already does something "similar" in say one of the optimisation passes > so i can get a look at how to get started on this? ipa-pure-const.c -- Eric Botcazou

Re: Functional Purity

2008-11-29 Thread Andrew Haley
Brendon Costa wrote: > I want to use GCC to categorise "functional purity" in C++. My > definition will differ from classic functional purity. In particular: > > A function is considered pure if it makes no changes to existing > memory or program state. There may be a fe

Re: Functional Purity

2008-11-28 Thread David Fang
When categorising a functions purity i also would like to identify the cause of the impurity. In particular for a function that is impure i want to categorise the impurity cause as: * modifies global state * modifies a function parameter * modifies the object state (this is an extension of the fun

Functional Purity

2008-11-28 Thread Brendon Costa
Hi all, I want to use GCC to categorise "functional purity" in C++. My definition will differ from classic functional purity. In particular: A function is considered pure if it makes no changes to existing memory or program state. There may be a few exceptions to this rule such as for