diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-30 17:49:10 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-30 17:49:10 +0000 |
commit | 88be9eb2c9d3b7f47aa958bfa489f7dba978ce1c (patch) | |
tree | 8a21c10206b0e28a0db7a8acc46b78fbe73b4d14 /gcc | |
parent | eb332399445920f44d1e3b4f195b1fabf6cd6819 (diff) | |
download | gcc-88be9eb2c9d3b7f47aa958bfa489f7dba978ce1c.tar.gz |
* decl.c (grokdeclarator): Don't override TYPE_NAME of an
anonymous class with a typedef if there are attributes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52954 138bc75d-0d04-0410-961f-82ee72b054a4
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); |