Tuesday, January 15, 2013

__attribute__

Mattt Thompson:

Using nonnull encodes expectations about values into an explicit contract, which can help catch any NULL pointer bugs lurking in any calling code. Remember: compile-time errors ≫ run-time errors.

Here’s the GCC reference for function attributes and the list of attributes supported by the Clang Static Analyzer.

Comments RSS · Twitter

Leave a Comment