The pure function attribute

The pure function attribute allows you to declare a function that can be called fewer times than what is literally in the source code. Declaring a function with the attribute pure indicates that the function has no effect except a return value that depends only on the parameters, global variables, or both.

Read syntax diagramSkip visual syntax diagrampure function attribute syntax
 
>>-__attribute__--((--+-pure-----+--))-------------------------><
                      '-__pure__-'
 

Related information