6.31. Declaring Attributes of Functions
6.31 Declaring Attributes of Functions
In GNU C, you declare certain things about functions called in your program which help the compiler optimize function calls and check your code more carefully.
The keyword __attribute__
allows you to specify special attributes when making a declaration. This keyword is followed by an attribute specification inside double parentheses. The following attributes are currently defined for functions on all targets: aligned
, alloc_size
, alloc_align
, assume_aligned
, noreturn
, returns_twice
, noinline
, noclone
, no_icf
, always_inline
, flatten
, pure
, const
, nothrow
, sentinel
, format
, format_arg
, no_instrument_function
, no_split_stack
, se