diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-02-12 20:45:01 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-02-12 20:45:01 +0100 |
commit | b42e978f29b33071addff6d7bb8bcdb11d176606 (patch) | |
tree | f2023a9d7643e9f3a81f68d23a22cd61fc15b696 /gcc/tree-vect-loop.cc | |
parent | f3306a9455f4d2556ba941e5783c94d4bede3b58 (diff) | |
download | gcc-b42e978f29b33071addff6d7bb8bcdb11d176606.zip gcc-b42e978f29b33071addff6d7bb8bcdb11d176606.tar.gz gcc-b42e978f29b33071addff6d7bb8bcdb11d176606.tar.bz2 |
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.cc (extract_attribute_substring): Remove.
(lookup_scoped_attribute_spec): Don't call it.
* c-c++-common/Wattributes-3.c: New test.
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions