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

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

https://gcc.gnu.org/g:9de6ff5ec9a46951d2c71b5b32574a516a72b907

commit r13-8390-g9de6ff5ec9a46951d2c71b5b32574a516a72b907
Author: Jakub Jelinek <ja...@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  <ja...@redhat.com>

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

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

    (cherry picked from commit b42e978f29b33071addff6d7bb8bcdb11d176606)

Reply via email to