[RFC]: patch to detect invalid and missing ATTRIBUTE const/pure

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Fri Mar 22 21:18:00 GMT 2002


 > From: John Wehle <john@feith.com>
 > 
 > 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?  E.g. consider
host_integerp vs tree_low_cst.  Should the latter have the same
marking as the former?

--
Kaveh R. Ghazi			Director of Systems Architecture
ghazi@caip.rutgers.edu		Qwest Global Services



More information about the Gcc-patches mailing list