I am writing some code where there are a bunch of simple clean functions that are called a lot. It is absolutely safe if these functions get optimized so that they can be called less often.
I am currently using gcc as my compiler, and I am wondering if there is a portable way:
int foo(int) __attribute__ ((pure))
Key key information can be found here: http://www.ohse.de/uwe/articles/gcc-attributes.html#func-pure
How can I implement something like this if the pure keyword is not available?
c ++ gcc portability
shuttle87
source share