public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-3088] c: support the attribute starting with '_'
Date: Wed,  5 Oct 2022 12:53:41 +0000 (GMT)	[thread overview]
Message-ID: <20221005125341.130C53858C54@sourceware.org> (raw)

https://gcc.gnu.org/g:0afa9dfb8fb3302db7f104add5654436927dcb56

commit r13-3088-g0afa9dfb8fb3302db7f104add5654436927dcb56
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;

                 reply	other threads:[~2022-10-05 12:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221005125341.130C53858C54@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).