identifier as an argument, so the front end shouldn't look it up. */
bool
-attribute_takes_identifier_p (const_tree attr_id)
+attribute_takes_identifier_p (tree attr_id)
{
- if (is_attribute_p ("mode", attr_id)
- || is_attribute_p ("format", attr_id)
- || is_attribute_p ("cleanup", attr_id))
- return true;
- else
- return targetm.attribute_takes_identifier_p (attr_id);
+ return (is_attribute_p ("mode", attr_id)
+ || is_attribute_p ("format", attr_id)
+ || is_attribute_p ("cleanup", attr_id));
}
/* Attribute handlers common to C front ends. */
}
else if (is_type)
{
- if ((flags & (int) ATTR_FLAG_TYPE_IN_PLACE))
- /* OK, modify the type in place. */;
/* If we have a TYPE_DECL, then copy the type, so that we
don't accidentally modify a builtin type. See pushdecl. */
- else if (decl && TREE_TYPE (decl) != error_mark_node
- && DECL_ORIGINAL_TYPE (decl) == NULL_TREE)
+ if (decl && TREE_TYPE (decl) != error_mark_node
+ && DECL_ORIGINAL_TYPE (decl) == NULL_TREE)
{
tree tt = TREE_TYPE (decl);
*type = build_variant_type_copy (*type);
TREE_USED (*type) = TREE_USED (decl);
TREE_TYPE (decl) = *type;
}
- else
+ else if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE))
*type = build_variant_type_copy (*type);
TYPE_ALIGN (*type) = (1U << i) * BITS_PER_UNIT;