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: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Aug 2017 21:47:33 +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
--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
In my view, whenever it's meaningful to act on an attribute for a call via
a function pointer (e.g. format, format_arg, const, pure, noreturn, ...),
the attribute should apply to the type internally so that it can indeed
work with function pointers (this does not assert what decltype does or
does not do with such an attributed function, however).