This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Index: gcc/attribs.c =================================================================== --- gcc/attribs.c (.../trunk) (revision 180744) +++ gcc/attribs.c (.../branches/transactional-memory) (revision 180773) @@ -166,7 +166,8 @@ init_attributes (void) gcc_assert (strcmp (attribute_tables[i][j].name, attribute_tables[i][k].name)); } - /* Check that no name occurs in more than one table. */ + /* Check that no name occurs in more than one table. Names that + begin with '*' are exempt, and may be overridden. */ for (i = 0; i< ARRAY_SIZE (attribute_tables); i++) { size_t j, k, l; @@ -174,8 +175,9 @@ init_attributes (void) for (j = i + 1; j< ARRAY_SIZE (attribute_tables); j++) for (k = 0; attribute_tables[i][k].name != NULL; k++) for (l = 0; attribute_tables[j][l].name != NULL; l++) - gcc_assert (strcmp (attribute_tables[i][k].name, - attribute_tables[j][l].name)); + gcc_assert (attribute_tables[i][k].name[0] == '*' + || strcmp (attribute_tables[i][k].name, + attribute_tables[j][l].name)); } #endif
@@ -207,7 +209,7 @@ register_attribute (const struct attribu slot = htab_find_slot_with_hash (attribute_hash,&str, substring_hash (str.str, str.length), INSERT); - gcc_assert (!*slot); + gcc_assert (!*slot || attr->name[0] == '*'); *slot = (void *) CONST_CAST (struct attribute_spec *, attr); }
The above changes seem to belong to a different changeset and look strange. Why would attributes ever appear in two different tables?
Attachment:
x
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |