Syntax for Attribute Specifications

The syntax for an attribute specification is

__attribute__((
  list-of-attributes ))
  

where list-of-attributes is a comma-separated list of zero or more attributes to associate with the object. Place an attribute specification at the end of the delcaration and definition of a function, function parameter, or variable. Example of an attribute specification shows an example.

Listing 1. Example of an attribute specification
int f(int x __attribute__((unused))) __attribute__((never_inline));

int f(int x __attribute__((unused))) __attribute__((never_inline))
{
   return 20;
}
Related information
Syntax for Declaration Specifications