[Bug c++/102397] New: Documentation of attribute syntax does not discuss C++11 / C23 attribute syntax

dangelog at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat Sep 18 11:06:19 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102397

            Bug ID: 102397
           Summary: Documentation of attribute syntax does not discuss
                    C++11 / C23 attribute syntax
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dangelog at gmail dot com
  Target Milestone: ---

Hi,

The available documentation for attributes syntax 

https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute-Syntax

does not mention at all the possibility that in C++11 (and, I imagine, in C23)
one can specify any GCC-specific attribute using a [[gnu::attribute]] attribute
specifier, and not only the GCC-specific __attribute__((attribute)) syntax.

I think it would be worth mentioning in there that this is actually OK and
fully supported.


More information about the Gcc-bugs mailing list