This is the mail archive of the gcc-patches@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: [RFC]: patch to detect invalid and missing ATTRIBUTE const/pure


On 23-Mar-2002, Kaveh R. Ghazi <ghazi@caip.rutgers.edu> wrote:
>  > Some other observations:
>  > 
>  >   1) If the function was marked by the programmer, then you probably don't
>  >      want to issue warnings about the function being invalid for const
>  >      or pure just because a loop is present.  The programmer may know
>  >      that the loop always terminates.  However, it is useful to issue
>  >      a warning if the function writes to global memory.
> 
> Can similar reasoning be applied to otherwise const/pure functions
> which in pathological cases call noreturn functions?

IMHO: yes.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


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