Function and parameter attributes
These macros defined in <debug.h>
tell the compiler special attributes of a function or function parameter. Their expansions are GCC-specific.
UNUSED
Appended to a function parameter to tell the compiler that the parameter might not be used within the function. It suppresses the warning that would otherwise appear.
NO_RETURN
Appended to a function prototype to tell the compiler that the function never returns. It allows the compiler to fine-tune its warnings and its code generation.
NO_INLINE
Appended to a function prototype to tell the compiler to never emit the function in-line. Occasionally useful to improve the quality of backtraces (see below).
PRINTF_FORMAT (format, first)
Appended to a function prototype to tell the compiler that the function takes a
printf
-like format string as the argument numberedformat
(starting from 1) and that the corresponding value arguments start at the argument numberedfirst
. This lets the compiler tell you if you pass the wrong argument types.