diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3ef996bffd8..d068caf8786 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +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>$. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 9f03294c94a..f354336d3c3 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -11262,6 +11262,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) && 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); |