mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
attribs: Use attribute_value_equal in decl_attributes
This is another thing discussed in the 1/9 Reflection thread, also not dependent on reflection. decl_attributes calls simple_cst_equal on TREE_VALUEs of the current and preexisting attributes, but that is just a small part of how attribute values should be compared. The following patch fixes that. 2025-12-06 Jakub Jelinek <jakub@redhat.com> * attribs.cc (decl_attributes): Use attribute_value_equal to compare attribute values instead of simple_cst_equal.
This commit is contained in:
committed by
Jakub Jelinek
parent
3b7e865779
commit
c57188ef0c
@@ -967,10 +967,8 @@ decl_attributes (tree *node, tree attributes, int flags,
|
||||
for (a = find_same_attribute (attr, old_attrs);
|
||||
a != NULL_TREE;
|
||||
a = find_same_attribute (attr, TREE_CHAIN (a)))
|
||||
{
|
||||
if (simple_cst_equal (TREE_VALUE (a), args) == 1)
|
||||
break;
|
||||
}
|
||||
if (attribute_value_equal (a, attr))
|
||||
break;
|
||||
|
||||
if (a == NULL_TREE)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user