public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/113674] [11 Regression] [[____attr____]] causes internal compiler error: in decl_attributes, at attribs.cc:776
Date: Thu, 20 Jun 2024 13:22:15 +0000	[thread overview]
Message-ID: <bug-113674-4-E0iZT4af9K@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113674-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113674

--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:f520f125920460d9360e2a5619b22c7ac81d35ba

commit r11-11494-gf520f125920460d9360e2a5619b22c7ac81d35ba
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Feb 12 20:45:01 2024 +0100

    attribs: Don't canonicalize lookup_scoped_attribute_spec argument
[PR113674]

    The C and C++ FEs when parsing attributes already canonicalize them
    (i.e. if they start with __ and end with __ substrings, we remove those).
    lookup_attribute already verifies in gcc_assert that the first character
    of name is not an underscore, and even lookup_scoped_attribute_spec doesn't
    attempt to canonicalize the namespace it is passed.  But for some historic
    reason it was canonicalizing the name argument, which misbehaves when
    an attribute starts with ____ and ends with ____.
    I believe it is just wrong to try to canonicalize
    lookup_scope_attribute_spec name attribute, it should have been
    canonicalized already, in other spots where it is called it is already
    canonicalized before.

    2024-02-12  Jakub Jelinek  <jakub@redhat.com>

            PR c++/113674
            * attribs.c (extract_attribute_substring): Remove.
            (lookup_scoped_attribute_spec): Don't call it.

            * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name.

            * c-c++-common/Wattributes-3.c: New test.

    (cherry picked from commit b42e978f29b33071addff6d7bb8bcdb11d176606)

  parent reply	other threads:[~2024-06-20 13:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 21:44 [Bug c++/113674] New: " mpolacek at gcc dot gnu.org
2024-01-30 21:46 ` [Bug c++/113674] [11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
2024-01-31  8:21 ` rguenth at gcc dot gnu.org
2024-01-31 16:06 ` mpolacek at gcc dot gnu.org
2024-01-31 16:38 ` jakub at gcc dot gnu.org
2024-01-31 16:54 ` mpolacek at gcc dot gnu.org
2024-01-31 18:40 ` jsm28 at gcc dot gnu.org
2024-02-12 12:23 ` jakub at gcc dot gnu.org
2024-02-12 19:45 ` cvs-commit at gcc dot gnu.org
2024-02-12 19:48 ` [Bug c++/113674] [11/12/13 " jakub at gcc dot gnu.org
2024-03-02  0:38 ` cvs-commit at gcc dot gnu.org
2024-03-04 12:08 ` [Bug c++/113674] [11/12 " jakub at gcc dot gnu.org
2024-06-11 10:37 ` cvs-commit at gcc dot gnu.org
2024-06-11 10:50 ` [Bug c++/113674] [11 " jakub at gcc dot gnu.org
2024-06-20 13:22 ` cvs-commit at gcc dot gnu.org [this message]
2024-06-20 13:38 ` jakub at gcc dot gnu.org

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=bug-113674-4-E0iZT4af9K@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).