This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81605] -Wignored-attributes emitted when decltype(function) used in template for function with __nonnull__
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 28 Jul 2017 17:51:58 +0000
- Subject: [Bug c++/81605] -Wignored-attributes emitted when decltype(function) used in template for function with __nonnull__
- Auto-submitted: auto-generated
- References: <bug-81605-4@http.gcc.gnu.org/bugzilla/>
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.)