https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86453
--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> --- On July 11, 2018 8:12:17 PM GMT+02:00, "msebor at gcc dot gnu.org" <gcc-bugzi...@gcc.gnu.org> wrote: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86453 > >--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> --- >The attribute exclusion framework only excludes conflicting attributes >if they >aren't applied by their handler. It doesn't know how to undo changes >that the >handler makes, like modifying tree nodes in place. It would need to be >extended to also let each handler detect the conflicts before making >these >kinds of changes. Note that no_add_attr doesn't mean the attribute isn't applied. Instead some attributes are optimized and translated to tree flags. There isn't really a way the handler can signal the attribute wasn't applied.