# Attributes

Attributes are a way to provide additional information about a declaration to the compiler. The C+11 attribute syntax is consistent with the C2x standard.

## Using Attributes

The compiler supports three ways to add attributes to your program:

- Gnu Syntax

      __attribute__((attribute_name(arguments)))

- Microsoft Syntax

      __declspec(attribute_name(argument))

- C++11 Standardized Attribute Syntax (part of the C++11 language standard)

      [[attribute_name(arguments)]]

      [[attribute-namespace :: attribute_name(arguments)]]

Some attributes are available for both Intel® microprocessors and non-Intel microprocessors but they may perform additional optimizations for Intel® microprocessors than they perform for non-Intel microprocessors. Refer to the individual attribute name for a detailed description.

Parent topic: Compiler Reference

- align
  Directs the compiler to align the variable to a specified boundary and a specified offset.
- align_value
  Provides the ability to add a pointer alignment value to a pointer typedef declaration.
- allow_cpu_features
  Provides the ability for a function to use intrinsic functions and architecture specific functionality.
- concurrency_safe
  Guides the compiler to parallelize more loops and straight-line code.
- const
  Indicates that a function has no effect other than returning a value and that it uses only its arguments to generate that return value.
- cpu_dispatch, cpu_specific
  Provides the ability to write one or more versions of a function that execute only on a list of targeted processors (cpu_dispatch). Provides the ability to declare that a version of a function is targeted at particular types of processors (cpu_specific).
- mpx
  Directs the compiler to pass Intel® Memory Protection Extensions (Intel® MPX) bounds information along with any pointer-typed parameters.