re PR c++/28407 (Issue with anonymous namespace)
authorJason Merrill <jason@redhat.com>
Thu, 20 Jul 2006 16:02:57 +0000 (12:02 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 20 Jul 2006 16:02:57 +0000 (12:02 -0400)
commitb70f0f48c716c8571723ee667f9712fd7e097490
tree2668380ba111a9cfdf1beb690c74127fc5593651
parente67b81d14078e85aff856cd25679a4f349e9c3b4
re PR c++/28407 (Issue with anonymous namespace)

        PR c++/28407
        * cp/decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
        const variables with implicit internal linkage.
        * cp/tree.c (decl_linkage): Only return lk_external if it's set.

        PR c++/28409
        * cp/decl2.c (constrain_visibility): Ignore the anonymous namespace
        for extern C decls.
        (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.

        Don't override explicit visibility.
        * cp/decl2.c (constrain_visibility): Remove specified and reason
        parameters.  Don't touch decls that already have explicit visibility.
        (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
        template.
        (determine_visibility_from_class): Reverse sense of
        DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
        (constrain_class_visibility): Only complain about member visibility
        if the member type is another class.  Don't change visibility of the
        current class.
        * tree.c (remove_attribute): New fn.
        * tree.h: Declare it.

From-SVN: r115622
14 files changed:
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/pt.c
gcc/cp/tree.c
gcc/doc/extend.texi
gcc/testsuite/g++.dg/ext/visibility/template6.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/visibility/warn2.C
gcc/testsuite/g++.dg/ext/visibility/warn3.C
gcc/testsuite/g++.dg/lookup/anon5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/anon4.C [new file with mode: 0644]
gcc/tree.c
gcc/tree.h