https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90953
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -7601,13 +7601,13 @@ check_missing_format_attribute (tree ltype, tree rtype) tree ra; for (ra = TYPE_ATTRIBUTES (ttr); ra; ra = TREE_CHAIN (ra)) - if (is_attribute_p ("format", TREE_PURPOSE (ra))) + if (is_attribute_p ("format", get_attribute_name (ra))) break; if (ra) { tree la; for (la = TYPE_ATTRIBUTES (ttl); la; la = TREE_CHAIN (la)) - if (is_attribute_p ("format", TREE_PURPOSE (la))) + if (is_attribute_p ("format", get_attribute_name (la))) break; return !la; }