[RFC]: patch to detect invalid and missing ATTRIBUTE const/pure
Fergus Henderson
fjh@cs.mu.oz.au
Sun Mar 24 23:11:00 GMT 2002
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.
More information about the Gcc-patches
mailing list