<HTML><HEAD><META content="text/html; charset=UTF-8" http-equiv="Content-Type"></HEAD><BODY style="font-family: tt;"><div style="font-family: tt;">Martin J. O'Riordan schrieb:<BR>
<blockquote type="cite"><BR>
<BR>
extern void *lookup(int) __attribute__((pure));<BR>
<BR>
might do what you need though.<BR>
<BR>
</blockquote><BR>
<BR>
<BR>
Good, that's pretty much what I was looking for. With that I was able to google for <BR>
<BR>
https://stackoverflow.com/questions/29117836/attribute-const-vs-attribute-pure-in-gnu-c<BR>
<BR>
which leads me to:<BR>
<BR>
__attribute__((const)) function attribute<BR>
Many functions examine only the arguments passed to them, and have no effects except for the return value. This is a much stricter class than __attribute__((pure)), because a function is not permitted to read global memory. If a function is known to operate only on its arguments then it can be subject to common sub-expression elimination and loop optimizations.<BR>
<BR>
The last sentence is what I am after. :) Unfortunately at least in clang 3.7 it does not seem to do anything.<BR>
<BR>
Thanks for the help.<BR>
<BR>
Ciao<BR>
   Nat!</div></BODY></HTML>