I'm writing some code where there are a bunch of simple pure functions that get called a lot. It's perfectly safe if these functions get get optimized to be called less often.
Currently I am using gcc as my compiler and I'm wondering if there is a portable way of doing:
int foo(int) __attribute__ ((pure))
Info about the pure keyword can be found here: http://www.ohse.de/uwe/articles/gcc-attributes.html#func-pure
How would I go about implementing something like this if the pure keyword is not available?