(SPARC) #pragma no_side_effect(funcname[, funcname…])
funcname specifies the name of a function within the current translation unit. The function must be declared with a prototype or empty parameter list prior to the pragma. The pragma must be specified prior to the function’s definition. For the named function, funcname, the pragma declares that the function has no side effects of any kind. This means that funcname returns a result value that depends only on the passed arguments. In addition, funcname and any called descendants:
Do not access for reading or writing any part of the program state visible in the caller at the point of the call.
Do not perform I/O.
Do not change any part of the program state not visible at the point of the call.
The compiler can use this information when doing optimizations using the function. If the function does have side effects, the results of executing a program which calls this function are undefined. The compiler takes advantage of this information at optimization level of 3 or above.