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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to rguent...@suse.de from comment #8)
> IMO this asks for metadata on each (standard) attribute whether it
> merges conservatively by union or by intersection since there are
> two classes of attributes.

Well, doing so would violate the standard, which added a clear:
"If one of the types has a standard attribute, the composite type also has that
attribute."

> And then there's things like [[gnu::warn_unused_result]] where
> it's not at all clear what is "conservative" (drop valid diagnostics
> or introduce broken ones?).

gnu::warn_unused_result is not a standard attribute (but currently we merge all
of them), but more importantly it isn't a function type attribute, but function
decl attribute.  Those aren't merged.

Reply via email to