mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-20 16:09:42 +08:00
tree.c (valid_machine_attribute): Only create a new type variant if there is a decl to use it.
* tree.c (valid_machine_attribute): Only create a new type variant if there is a decl to use it. From-SVN: r21247
This commit is contained in:
parent
03d8299153
commit
f022f9bcfc
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
||||
Thu Jul 16 14:48:04 1998 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* gcc.c (do_spec_1): Cope with %g/%u/%U options which do not have
|
||||
|
@ -3391,8 +3391,14 @@ valid_machine_attribute (attr_name, attr_args, decl, type)
|
||||
}
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user