https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71463
--- Comment #15 from Martin Sebor <msebor at gcc dot gnu.org> --- As Jason explained it works as designed. But the warning is certainly confusing. It doesn't help that not all attributes enjoy this special treatment or that the manual doesn't explain it. At a minimum, I think the manual needs to be updated. It would help if the warning mentioned the names of the attributes that are being ignored and, perhaps in a note, gave a hint as to why.