gcc attribute overview
List of attributes that can be used improve gcc optimisations. The ones I find most useful are:
http://www.ohse.de/uwe/articles/gcc-attributes.html
- pure: Function doesn't change any external variables.
- const: Function doesn't read any external variables.
- noreturn: Function will not return e.g. exit() or abort().
- nonnull: Warning if null arguments are passed.
- warn_unused_result: Warns if the result of a function is not used/checked.
http://www.ohse.de/uwe/articles/gcc-attributes.html
Comments