* decl.c (grokdeclarator): Don't override TYPE_NAME of an
anonymous class with a typedef if there are attributes.
[[Split portion of a mixed commit.]]
From-SVN: r52955.1
+2002-04-30 Jason Merrill <jason@redhat.com>
+
+ * decl.c (grokdeclarator): Don't override TYPE_NAME of an
+ anonymous class with a typedef if there are attributes.
+
2002-04-29 Paul Eggert <eggert@twinsun.com>
* parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
&& TYPE_NAME (type)
&& TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
&& TYPE_ANONYMOUS_P (type)
+ /* Don't do this if there are attributes. */
+ && (!attrlist || !*attrlist)
&& cp_type_quals (type) == TYPE_UNQUALIFIED)
{
tree oldname = TYPE_NAME (type);