Function attributes are specified as part of a function declaration. After the closing parenthesis of the functions arguments the keyword __attribute__ followed by the desired attributes in a set of double parenthesis. Here's a function with the pure attribute.
Functions can have multiple attributes, to do this, separate the attributes with commas inside the double parenthesis.