|
NAME | SYNOPSIS | DESCRIPTION | VERSIONS | STANDARDS | HISTORY | COLOPHON |
|
|
|
intro(3attr) intro(3attr)
intro - C/C++ attributes
[[attr]]
[[vendor::attr]]
Attributes modify the properties of a source construct, such as a
type, a variable, or a function.
The standard syntax allows specifying a vendor for non-standard
attributes.
C and C++ dialects have provided various forms of attributes
before standardization.
__attribute__((attr))
This is the GNU syntax for attributes. It is supported by
both GCC and Clang.
__declspec(attr)
This is the MSVC syntax for attributes. It is supported by
Clang.
C23, C++23.
[[attr]]
[[vendor::attr]]
C23, C++11.
[[attr]]
[[gnu::attr]]
gcc 10, g++ 9, clang 9, clang++ 9.
__attribute__((attr))
gcc, g++, clang, clang++.
__declspec(attr)
clang, clang++.
This page is part of the man-pages (Linux kernel and C library
user-space interface documentation) project. Information about
the project can be found at
⟨https://www.kernel.org/doc/man-pages/⟩. If you have a bug report
for this manual page, see
⟨https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING⟩.
This page was obtained from the tarball man-pages-6.15.tar.gz
fetched from
⟨https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/⟩ on
2025-08-11. If you discover any rendering problems in this HTML
version of the page, or you believe there is a better or more up-
to-date source for the page, or you have corrections or
improvements to the information in this COLOPHON (which is not
part of the original manual page), send a mail to
[email protected]
Linux man-pages 6.15 2025-06-28 intro(3attr)