diff options
author | Alejandro Colomar <alx@kernel.org> | 2025-06-27 05:13:30 +0200 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2025-06-28 16:51:42 +0200 |
commit | 4445a5dacb3b52c1ed2c735dd2908dbcd5f87505 (patch) | |
tree | 8330c5f1b158e4ba1b9d07fe040bc5158621bf27 | |
parent | ab6d18f812c9adea228bb6720265e035b2e92098 (diff) | |
download | man-pages-4445a5dacb3b52c1ed2c735dd2908dbcd5f87505.tar.gz |
man/man3attr/intro.3attr: Add page
Cc: Aaron Ballman <aaron@aaronballman.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r-- | man/man3attr/intro.3attr | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/man/man3attr/intro.3attr b/man/man3attr/intro.3attr new file mode 100644 index 0000000000..c488a06fc1 --- /dev/null +++ b/man/man3attr/intro.3attr @@ -0,0 +1,49 @@ +.\" Copyright, the authors of the Linux man-pages project +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH intro 3attr (date) "Linux man-pages (unreleased)" +.SH NAME +intro \- C/C++ attributes +.SH SYNOPSIS +.nf +.BI [[ attr ]] +.BI [[ vendor :: attr ]] +.fi +.SH DESCRIPTION +Attributes modify the properties of a source construct, +such as a type, a variable, or a function. +.P +The standard syntax allows specifying a +.I vendor +for non-standard attributes. +.SH VERSIONS +C and C++ dialects have provided various forms of attributes +before standardization. +.TP +.BI __attribute__(( attr )) +This is the GNU syntax for attributes. +It is supported by both GCC and Clang. +.TP +.BI __declspec( attr ) +This is the MSVC syntax for attributes. +It is supported by Clang. +.SH STANDARDS +C23, C++23. +.SH HISTORY +.TP +.BI [[ attr ]] +.TQ +.BI [[ vendor :: attr ]] +C23, C++11. +.TP +.BI [[ attr ]] +.TQ +.BI [[gnu:: attr ]] +gcc 10, g++ 9, clang 9, clang++ 9. +.TP +.BI __attribute__(( attr )) +gcc, g++, clang, clang++. +.TP +.BI __declspec( attr ) +clang, clang++. |