https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86368
Justin Bassett <jbassett271 at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jbassett271 at gmail dot com --- Comment #7 from Justin Bassett <jbassett271 at gmail dot com> --- Currently, the unknown attribute warning means that we get a warning for typos in a whitelisted set of attributes: the standardized attributes and the gnu::attributes. If this set of whitelisted attributes could be extended, that would be the ideal solution, IMO, since the user would also get typo detection for their additional attributes. Something like -Wignore-unknown-attribute=likely -Wignore-unknown-attribute=some_ns::some_attribute . ---- Jonathan Wakely's suggestion is a decent solution to this problem. However, it won't detect typos in user attributes, and it won't extend to future standardized attributes. Another idea is to warn if the edit-distance from the unknown attribute to a known attribute is small. So [[noretrun]] has a small edit distance and could emit a warning with, "Did you mean [[noreturn]]?" And [[some_future_std_attribute]] would emit no warning because it has a large edit distance from all known attributes.