public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] c: support attribs starting with '_'
@ 2022-10-05 11:42 Martin Liška
  2022-10-05 11:48 ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Liška @ 2022-10-05 11:42 UTC (permalink / raw)
  To: gcc-patches

Support attributes starting with dash (like _noreturn, or __Noreturn).
Note the only consumer of lookup_attribute_by_prefix comes from IPA ICF.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

	PR c/107156

gcc/ChangeLog:

	* attribs.h (lookup_attribute_by_prefix): Support attributes
	starting with dash (like _noreturn, or __Noreturn).
---
 gcc/attribs.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/gcc/attribs.h b/gcc/attribs.h
index b2836560fc2..706d35e63d8 100644
--- a/gcc/attribs.h
+++ b/gcc/attribs.h
@@ -274,8 +274,6 @@ lookup_attribute_by_prefix (const char *attr_name, tree list)
 	    }
 
 	  const char *p = IDENTIFIER_POINTER (name);
-	  gcc_checking_assert (attr_len == 0 || p[0] != '_');
-
 	  if (strncmp (attr_name, p, attr_len) == 0)
 	    break;
 
-- 
2.37.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-05 12:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05 11:42 [PATCH] c: support attribs starting with '_' Martin Liška
2022-10-05 11:48 ` Andreas Schwab
2022-10-05 11:49   ` Martin Liška
2022-10-05 12:01     ` Jakub Jelinek
2022-10-05 12:52       ` Martin Liška

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).