https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122483
--- Comment #38 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Alex Coplan from comment #30) > The other approach is to allow passing down a specific attribute, which > gives the backend more fine-grained control, but I believe isn't actually > necessary for what we want on aarch64, i.e. something like: > > bool targetm.can_inherit_type_attribute_p (const_tree attr); > > It seems somewhat pointless for the FE to query this hook only for the > backend to simply lookup the attribute_spec and check the > affects_type_identity flag (which could have been done in the front-end). I prefer this direction, as it avoids changing the behavior of generic type-affecting attributes. As a general rule I think it would make sense to treat as non-inheritable target pseudo-keywords like __arm_streaming_compatible that just happen to be implemented using the attribute machinery.
