2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-04-13 07:30:31 +08:00

c: support the attribute starting with '_'

PR c/107156

gcc/ChangeLog:

	* attribs.h (lookup_attribute_by_prefix): Support the attribute
	starting with underscore (_Noreturn).
This commit is contained in:
Martin Liska 2022-10-05 12:34:30 +02:00
parent dc70f3f81b
commit 0afa9dfb8f

@ -274,8 +274,8 @@ lookup_attribute_by_prefix (const char *attr_name, tree list)
}
const char *p = IDENTIFIER_POINTER (name);
gcc_checking_assert (attr_len == 0 || p[0] != '_');
gcc_checking_assert (attr_len == 0 || p[0] != '_'
|| (ident_len > 1 && p[1] != '_'));
if (strncmp (attr_name, p, attr_len) == 0)
break;