The following are supported attributes:The following attributes, invoked by __attribute__ ((keyword)), or alternatively by [[keyword]], are implemented by the compiler for compatibility. Spelling the attribute keyword within double underscores, __keyword__, is also accepted.
Roughly equivalent to #pragma align. Generates a warning and is ignored if used on variable length arrays.
Equivalent to #pragma inline and -xinline
Equivalent to #pragma no_side_effect
Equivalent to #pragma init
Results in a warning if the type, variable, or function is used in the source file. The optional argument msg must be a string literal and will be included in the warning message.
Equivalent to #pragma fini
Equivalent to #pragma returns_new_memory
(No equivalent)
Equivalent to #pragma no_inline and -xinline
Equivalent to #pragma does_not_return
Equivalent to #pragma does_not_write_global_data
Equivalent to #pragma pack(). See details below.
Equivalent to #pragma unknown_control_flow
Accepted for compatibility with g++, but has no effect. The g++ documentation recommends not using this attribute.
Indicates that a variable or a type name (created using typedef) represents a vector.
Provides linker scoping. (See -xldscope={v}) Syntax is: __attribute__((visibility(“visibility-type”))), where visibility-type is one of:
Same as __global linker scoping
Same as __hidden linker scoping
Same as __symbolic linker scoping
Equivalent to #pragma weak