https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39159
Gert <gw.fossdev at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gw.fossdev at gmail dot com --- Comment #5 from Gert <gw.fossdev at gmail dot com> --- Created attachment 38202 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38202&action=edit Proposed patch to silence the warning if the new attribute is same Hello, I propose the attached patch for this. I'm flying blind here and the patch is not yet tested. The idea is to search whether the attribute to be applied is already set and if this is the case, to not emit a warning, and otherwise to rephrase the warning pointing out that a different attribute was specified. The code was inspired by the lines starting from 589 in the same file gcc/attribs.c. Now since I don't know whether simple_cst_equal really compares the value of the attribute, or just some attribute type, it may be that the code does not do what I hope to achieve. Any comments how to improve the patch are very welcome. Best, Gert