summaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-30 17:49:10 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-30 17:49:10 +0000
commit88be9eb2c9d3b7f47aa958bfa489f7dba978ce1c (patch)
tree8a21c10206b0e28a0db7a8acc46b78fbe73b4d14 /gcc/cp/decl.c
parenteb332399445920f44d1e3b4f195b1fabf6cd6819 (diff)
downloadgcc-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/cp/decl.c')
-rw-r--r--gcc/cp/decl.c2
1 files changed, 2 insertions, 0 deletions
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);