Re: man3attr/intro.3attr: Add intro page for this subsection
From: Alejandro Colomar <alx@kernel.org>
Date: 2025-06-27 03:30:40
Hi Aaron, On Fri, Jun 27, 2025 at 05:18:22AM +0200, Alejandro Colomar wrote:
Hi Aaron, I've added an intro(3attr) page introducing C/C++ attributes: $ MANWIDTH=64 man 3attr intro | cat; intro(3attr) intro(3attr) NAME intro - C/C++ attributes SYNOPSIS [[attr]] [[vendor::attr]] DESCRIPTION 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. VERSIONS C and C++ dialects have provided various forms of at‐ tributes 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. STANDARDS C23, C++23. HISTORY C23, C++11.
I'm expanding the HISTORY to document the compiler versions where the different syntaxes were added: --- HEAD:man/man3attr/intro.3attr +++ ./man/man3attr/intro.3attr @@ -25,6 +25,18 @@ C23, C++23. HISTORY - C23, C++11. + [[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++. Cheers, Alex
Linux man‐pages 6.14‐84... 2025‐06‐27 intro(3attr) This page will go as the first one in the 3attr section in the PDF book of the manual. Please let me know if you find any imprecissions in it. Have a lovely day! Alex -- <https://www.alejandro-colomar.es/>
-- <https://www.alejandro-colomar.es/>
Attachments
- signature.asc [application/pgp-signature] 833 bytes