aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2002-04-30 13:49:10 -0400
committerJason Merrill <jason@gcc.gnu.org>2002-04-30 13:49:10 -0400
commitac905924b6341421aa03e3895d906a266c391330 (patch)
tree8a21c10206b0e28a0db7a8acc46b78fbe73b4d14 /gcc
parent3d34cd91fa983199a45e77feb1e09abcf7404a0c (diff)
downloadgcc-ac905924b6341421aa03e3895d906a266c391330.zip
gcc-ac905924b6341421aa03e3895d906a266c391330.tar.gz
gcc-ac905924b6341421aa03e3895d906a266c391330.tar.bz2
decl.c (grokdeclarator): Don't override TYPE_NAME of an anonymous class with a typedef if...
* decl.c (grokdeclarator): Don't override TYPE_NAME of an anonymous class with a typedef if there are attributes. From-SVN: r52954
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3ef996bf..d068caf 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 9f03294..f354336 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);