aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-01-04 11:50:28 -0500
committerJason Merrill <jason@gcc.gnu.org>2013-01-04 11:50:28 -0500
commit82f2836c6e0eab99dc2ed4d761fbc611408902a1 (patch)
tree272133bc00c41ec2517ff7555854b0777de65f72 /gcc/cp/tree.c
parent1582c67762711468720324ddbfd6c305b7eee6b1 (diff)
downloadgcc-82f2836c6e0eab99dc2ed4d761fbc611408902a1.zip
gcc-82f2836c6e0eab99dc2ed4d761fbc611408902a1.tar.gz
gcc-82f2836c6e0eab99dc2ed4d761fbc611408902a1.tar.bz2
re PR c++/55877 (Anon visibility issues)
PR c++/55877 * decl.c (reset_type_linkage, bt_reset_linkage): New. (grokdeclarator): Use reset_type_linkage. * name-lookup.c (binding_table_foreach): Handle null table. * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME. From-SVN: r194910
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index c658582..fcab1a4 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -2404,7 +2404,7 @@ decl_anon_ns_mem_p (const_tree decl)
/* Classes and namespaces inside anonymous namespaces have
TREE_PUBLIC == 0, so we can shortcut the search. */
else if (TYPE_P (decl))
- return (TREE_PUBLIC (TYPE_NAME (decl)) == 0);
+ return (TREE_PUBLIC (TYPE_MAIN_DECL (decl)) == 0);
else if (TREE_CODE (decl) == NAMESPACE_DECL)
return (TREE_PUBLIC (decl) == 0);
else