diff options
author | Dodji Seketeli <dodji@redhat.com> | 2009-01-22 07:15:41 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@gcc.gnu.org> | 2009-01-22 08:15:41 +0100 |
commit | 03c2a308f32b01bdb5bea5538bccbb9b885b47a9 (patch) | |
tree | 8c0ca9e4a8b6ac8aced92cf10fba12e1269c35c1 /gcc/cp/decl.c | |
parent | 73cc93abd2d93d6d5dcbfb8654bc7718a13c2476 (diff) | |
download | gcc-03c2a308f32b01bdb5bea5538bccbb9b885b47a9.zip gcc-03c2a308f32b01bdb5bea5538bccbb9b885b47a9.tar.gz gcc-03c2a308f32b01bdb5bea5538bccbb9b885b47a9.tar.bz2 |
Reverted commit 143546 related to PR c++/26693
From-SVN: r143562
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 2163e39..8476959 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -8729,7 +8729,6 @@ grokdeclarator (const cp_declarator *declarator, decl = build_lang_decl (TYPE_DECL, unqualified_id, type); else decl = build_decl (TYPE_DECL, unqualified_id, type); - if (id_declarator && declarator->u.id.qualifying_scope) { error ("%Jtypedef name may not be a nested-name-specifier", decl); TREE_TYPE (decl) = error_mark_node; @@ -8764,11 +8763,12 @@ grokdeclarator (const cp_declarator *declarator, && TYPE_ANONYMOUS_P (type) && cp_type_quals (type) == TYPE_UNQUALIFIED) { + tree oldname = TYPE_NAME (type); tree t; /* Replace the anonymous name with the real name everywhere. */ for (t = TYPE_MAIN_VARIANT (type); t; t = TYPE_NEXT_VARIANT (t)) - if (ANON_AGGRNAME_P (TYPE_IDENTIFIER (t))) + if (TYPE_NAME (t) == oldname) TYPE_NAME (t) = decl; if (TYPE_LANG_SPECIFIC (type)) |