[Bug c++/71463] [6/7 regression] unexpected warning: ignoring function return attributes on template argument
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 18 16:59:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71463
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #6)
> I didn't know that GCC considers attribute warn_unused_result part of the
> function type. When you say that most of these attributes apply to the
> function type, which others are you referring to?
Other attributes that apply to a function type: nonnull, returns_nonnull,
sentinel, alloc_size, alloc_align, assume_aligned, format, format_arg.
I don't know why they were defined this way; I imagine it was to support using
them on function pointers.
More information about the Gcc-bugs
mailing list