This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Documented support for attributes on function definitions?
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Markus Elfring <Markus dot Elfring at web dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sat, 2 Dec 2017 14:01:50 -0600
- Subject: Re: Documented support for attributes on function definitions?
- Authentication-results: sourceware.org; auth=none
- References: <924f6c04-4e4d-2330-cfd5-d6a7c7354a2c@web.de>
Hi!
On Sat, Dec 02, 2017 at 06:05:42PM +0100, Markus Elfring wrote:
> The GCC documentation provides a specific information:
> https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Function-Attributes.html
> “…
> Function attributes are introduced by the __attribute__ keyword on a declaration,
> …”
>
> The corresponding examples specify such attributes at the end of each
> function declaration. I constructed another small test program which can show
> that they work also at other positions with function definitions.
>
> How do you think about to describe this possibility better in the documentation?
There is
https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Attribute-Syntax.html#All-other-attributes
already, but it isn't too easy to read (or to find, apparently).
Suggestions welcome! Patches even better ;-)
Segher