https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83503
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW Assignee|jason at gcc dot gnu.org |unassigned at gcc dot gnu.org --- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #3) If we want to make that change (for C and C++), then handle_const_attribute could simply remove any instances of pure in DECL_ATTRIBUTES. To address 83871 and 83502 as well, I think we want to have cplus_decl_attributes prune conflicting attributes from the DECL_ATTRIBUTES when DECL_TEMPLATE_SPECIALIZATION. This should share a lot of the diag_attr_exclusions code; Martin, want to handle that?