* tree.c (valid_machine_attribute): Only create a new type variant if
there is a decl to use it.
From-SVN: r21246
+Fri Jul 17 03:26:12 1998 Rihcard Earnshaw (rearnsha@arm.com)
+
+ * tree.c (valid_machine_attribute): Only create a new type variant if
+ there is a decl to use it.
+
Fri Jul 17 02:01:00 1998 Jeffrey A Law (law@cygnus.com)
* Makefile.in (WARN_CFLAGS): Disable -W -Wall for the release
}
else
{
+ /* If this is part of a declaration, create a type variant,
+ otherwise, this is part of a type definition, so add it
+ to the base type. */
type_attr_list = tree_cons (attr_name, attr_args, type_attr_list);
- type = build_type_attribute_variant (type, type_attr_list);
+ if (decl != 0)
+ type = build_type_attribute_variant (type, type_attr_list);
+ else
+ TYPE_ATTRIBUTES (type) = type_attr_list;
}
if (decl != 0)
TREE_TYPE (decl) = type;