decl2.c (determine_visibility): Make anonymous types internal.
authorJason Merrill <jason@redhat.com>
Fri, 18 Sep 2009 21:25:18 +0000 (17:25 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 18 Sep 2009 21:25:18 +0000 (17:25 -0400)
commitecc607fc08d8d9345406ff824063fcaf500f9021
treeec33a1350ff4e953d12da2838d2890d5f32c3181
parent5f5babf18b5bede638a67406cbd3ebf480cd4b8f
decl2.c (determine_visibility): Make anonymous types internal.

* decl2.c (determine_visibility): Make anonymous types internal.
(mark_used): Complain about types without linkage used in
decls with internal linkage.
(vague_linkage_fn_p): Split out from...
* decl.c (maybe_commonize_var): ...here.
(grokdeclarator): Adjust linkage when a typedef gives linkage name.
* tree.c (no_linkage_check): Check the enclosing class and template
arguments.

* cp-tree.h (TYPE_NAMESPACE_SCOPE_P): New.

From-SVN: r151868
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/nolinkage1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nolinkage1.h [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/nolinkage1a.cc [new file with mode: 0644]