https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81605
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic, documentation Status|UNCONFIRMED |NEW Last reconfirmed| |2017-07-28 CC| |msebor at gcc dot gnu.org See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=81565 Ever confirmed|0 |1 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- Confirmed. GCC considers some attributes on a function declaration as part of the function's type while others only as part of the declaration. As this is neither intuitive nor undocumented it's quite confusing and a source of bug reports. I just recently opened bug 81565 for this general problem but there have been others prior to it. At a minimum, the manual should mention for each function attribute whether or not it's part of the type system. Such function attributes should then also be referenced in the Type Attributes section. (Though my own preference would be to remove this feature and to treat all function attributes the same, i.e., as part of the function declaration only.)