public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/PR107156-allow-leading-dast-in-attr-v2)] c: support the attribute starting with '_'
@ 2022-10-05 12:10 Martin Liska
0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-10-05 12:10 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b7eb1e7a0e887849470ec96c5f31422b2224c461
commit b7eb1e7a0e887849470ec96c5f31422b2224c461
Author: Martin Liska <mliska@suse.cz>
Date: Wed Oct 5 12:34:30 2022 +0200
c: support the attribute starting with '_'
PR c/107156
gcc/ChangeLog:
* attribs.h (lookup_attribute_by_prefix): Support the attribute
starting with underscore (_Noreturn).
Diff:
---
gcc/attribs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/attribs.h b/gcc/attribs.h
index b2836560fc2..121b9ebbc39 100644
--- a/gcc/attribs.h
+++ b/gcc/attribs.h
@@ -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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-05 12:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05 12:10 [gcc(refs/users/marxin/heads/PR107156-allow-leading-dast-in-attr-v2)] c: support the attribute starting with '_' Martin Liska
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).