<div dir="ltr"><div dir="ltr">The following code will emit a warning with -Wattributes:<div><br></div><div><font face="courier new, monospace">[[some_ns::some_attribute]]</font></div><div><font face="courier new, monospace">void call_me();</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"><div><source>:1:3: warning: unknown attribute 'some_attribute' ignored [-Wunknown-attributes]</div><div>[[some_ns::some_attribute]]</div><div>  ^</div></font></div><div><font face="courier new, monospace"><br></font></div><div><font face="arial, sans-serif">However, this warning is very useful for detecting typos of standard attributes. AFAIK, there's no way to turn off the warning just for one attribute, just all of them (-Wno-unknown-attributes).</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">To solve this, I propose that we add the ability to specify attributes to ignore for -Wunknown-attributes. </font><span style="font-family:arial,sans-serif">In other words, something like this: '-Wignore-unknown-attribute=some_ns::some_attribute'.</span></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">There are some alternatives, such as only warning if the edit distance is close to a known attribute, but I think that specifying the known attribute in the build system like this is better, as it will also catch misspellings of [[some_ns::some_attribute]].</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Thank you,</font></div><div><font face="arial, sans-serif">Justin Bassett</font></div></div></div>