https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128072
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |easyhack
Ever confirmed|0 |1
Last reconfirmed| |2026-10-24
Status|UNCONFIRMED |NEW
--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. The reason why deprecated without a string is not copied is because
TREE_DEPRECATED is not copied (and does not add the deprecated attribute then).
But then deprcated attribute itself is copied so it copies the one with the
string.
Should be easy to fix by skipping the deprcated attribute in this loop:
/* Copy decl attributes from REF to DECL. */
for (tree at = attrs; at; at = TREE_CHAIN (at))
{