__attribute__((const)) function attribute
The const function attribute specifies that a function examines only its arguments, and has no effect except for the return value. That is, the function does not read or modify any 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.
This is a much stricter class than __attribute__((pure)) because functions are not permitted to read global memory.