Sparse - Annotations

Annotations

Some of the checks performed by Sparse require annotating the source code using the __attribute__ GCC extension, or the Sparse specific __context__ specifier. Sparse defines the following list of attributes:

  • address_space(num)
  • bitwise
  • force
  • context(expression,in_context,out_context)

When an API is defined with a macro, the specifier __attribute__((context(...))) can be replaced by __context__(...).

Read more about this topic:  Sparse