Interface __CONST_ATTR__

Preprocessor macro expanding to a type attribute

#include <SYS/TYPES.H>

int __CONST_ATTR__ function(args...);

Description

This macro expands to a compiler-specific attribute telling that the function return value depends only on its arguments. It may not depend on global variables or content of dereferenced pointers.

It enables the compiler to do better optimizations.

Implementation note

When using the gcc compiler, this macro expands to __attribute__((__const__)).

See also

__PURE_ATTR__