summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-07-01 16:36:59 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-07-01 16:36:59 +0000
commita0e2d53c6287eba0167a285ef2fc7bcba7cf2788 (patch)
treee092c58a15de341e050673d3f489a6de4820898a /gcc/cp
parent2683f2ec6b530232112f56697463b029b1f7a8c9 (diff)
downloadgcc-a0e2d53c6287eba0167a285ef2fc7bcba7cf2788.tar.gz
* decl.c (grokdeclarator): Don't give names "for linkage purposes"
to anonymous cv-qualified types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27891 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 25a0005bb5b..e3ea60ded62 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+1999-07-01 Mark Mitchell <mark@codesourcery.com>
+
+ * decl.c (grokdeclarator): Don't give names "for linkage purposes"
+ to anonymous cv-qualified types.
+
1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
* lex.c (real_yylex) : Change integer literal overflow handling to
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 0a838ed75aa..b7a36de4021 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -11064,14 +11064,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
if (type != error_mark_node
&& TYPE_NAME (type)
&& TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
- && ANON_AGGRNAME_P (TYPE_IDENTIFIER (type)))
+ && ANON_AGGRNAME_P (TYPE_IDENTIFIER (type))
+ && CP_TYPE_QUALS (type) == TYPE_UNQUALIFIED)
{
tree oldname = TYPE_NAME (type);
tree t;
- /* FIXME: This is bogus; we should not be doing this for
- cv-qualified types. */
-
/* Replace the anonymous name with the real name everywhere. */
lookup_tag_reverse (type, declarator);
for (t = TYPE_MAIN_VARIANT (type); t; t = TYPE_NEXT_VARIANT (t))