aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-07-01 16:36:59 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-07-01 16:36:59 +0000
commitb537d12084f7aba41c814b0bcf0edf5d0ac3a159 (patch)
treee092c58a15de341e050673d3f489a6de4820898a /gcc/cp/decl.c
parentc05fb06e322102bee103b2d5843f8e546400dbf0 (diff)
downloadgcc-b537d12084f7aba41c814b0bcf0edf5d0ac3a159.zip
gcc-b537d12084f7aba41c814b0bcf0edf5d0ac3a159.tar.gz
gcc-b537d12084f7aba41c814b0bcf0edf5d0ac3a159.tar.bz2
decl.c (grokdeclarator): Don't give names "for linkage purposes" to anonymous cv-qualified types.
* decl.c (grokdeclarator): Don't give names "for linkage purposes" to anonymous cv-qualified types. From-SVN: r27891
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 0a838ed..b7a36de 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))