PR128072 reports that the copy attribute copies the deprecated attribute
when it has a message, although the manual says copy leaves deprecated
out. Patch 1 fixes that. unavailable is handled similarly, so on trunk
a copy of an unavailable declaration with a message is itself
unavailable. Patch 2 skips unavailable too. Patch 3 updates the manual
to name every attribute that handle_copy_attribute skips, including the
inlining ones, and patch 4 fixes two typos in a comment there
Tested on x86_64-pc-linux-gnu. I don't have write access, so I'd need
someone to push them
---
Hugo Sales (4):
c-family: Don't copy the deprecated attribute with the copy attribute
[PR128072]
c-family: Don't copy the unavailable attribute with the copy attribute
doc: List the attributes that the copy attribute leaves out
c-family: Fix typos in a handle_copy_attribute comment
gcc/c-family/c-attribs.cc | 22 ++++++++++++---
gcc/doc/extend.texi | 12 +++++---
gcc/testsuite/c-c++-common/attr-copy-pr128072.c | 33 ++++++++++++++++++++++
gcc/testsuite/c-c++-common/attr-copy-unavailable.c | 32 +++++++++++++++++++++
4 files changed, 91 insertions(+), 8 deletions(-)
---
base-commit: 303400bda9e33622ab24ff3c1f82866577fc7351
change-id: 20261118-pr128072-copy-deprecated-b8fa01552ac5
Best regards,
--
Hugo Sales <[email protected]>