OSDN Git Service

PR c++/26905
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Jun 2006 01:15:56 +0000 (01:15 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Jun 2006 01:15:56 +0000 (01:15 +0000)
commit4a2849cb4cf512dec94aa6bd2b83e0a7f2f25c81
tree93c1ec7ec5a70cb4b7384fa239594ed2f1288585
parent53b5c202d6b3e172065eaf9073e5c87f5b733806
    PR c++/26905
        PR c++/26612
        PR c++/27000
        PR c++/26984
        PR c++/19134
        * tree.c (build_decl_stat): Don't hande #pragma visibility here.
        * c-common.c (c_determine_visibility): Handle it here.
        * c-decl.c (finish_decl): Call c_determine_visibility for
        functions, too.
        * flags.h (enum symbol_visibility): Sort from most to least visibility.
        * tree.h: Likewise.
        * varasm.c (default_assemble_visibility): Likewise.
        * c-common.c (handle_visibility_attribute): Complain about trying
        to give visibility to an already defined class, or trying to change
        declared visibility. Always attach the attribute.
        * cp/decl2.c (determine_visibility): Overhaul.
        (determine_visibility_from_class): Likewise.
        (min_vis_r, type_visibility, constrain_visibility): New fns.
        (constrain_visibility_for_template): Likewise.
        (constrain_class_visibility): Likewise.
        * cp/decl.c (cp_finish_decl): Call determine_visibility for function
        decls, too.
        * cp/name-lookup.c (pushtag): Call determine_visibility.
        * cp/decl.c (duplicate_decls): Don't copy visibility from template to
        specialization.
        * cp/pt.c (check_explicit_specialization): Likewise.
        (lookup_template_class, tsubst_decl): Call determine_visibility.
        * cp/class.c (finish_struct_1): Call constrain_class_visibility.

        PR c++/26905
        PR c++/21675
        PR c++/17470
        * cp/parser.c (cp_parser_explicit_instantiation): Pass the attributes
        to grokdeclarator.
        (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
        (cp_parser_enum_specifier): Likewise.
        (cp_parser_elaborated_type_specifier): Apply attributes if this
        declares only the class.
        (cp_parser_class_specifier): Apply leading attributes immediately.
        * cp/semantics.c (begin_class_definition): Add attributes parameter,
        apply them to the type.
        * attribs.c (decl_attributes): Ignore type-in-place attributes
        once the type has been defined.

        PR c++/21581
        PR c++/25915
        * cp/tree.c (decl_anon_ns_mem_p): New function.
        * cp/cp-tree.h: Declare it.
        * cp/decl2.c (determine_visibility): Make anonymous namespace
        members static.
        (min_vis_r, constrain_visibility): Likewise.
        * cp/rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
        pseudo-types.
        * cp/decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
        global_namespace.
        * cp/name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
        on anonymous namespaces.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115086 138bc75d-0d04-0410-961f-82ee72b054a4
41 files changed:
gcc/ChangeLog
gcc/attribs.c
gcc/c-common.c
gcc/c-decl.c
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/name-lookup.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/rtti.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/doc/extend.texi
gcc/doc/invoke.texi
gcc/flags.h
gcc/testsuite/g++.dg/ext/attrib14.C
gcc/testsuite/g++.dg/ext/attrib9.C
gcc/testsuite/g++.dg/ext/visibility/anon1.C
gcc/testsuite/g++.dg/ext/visibility/anon2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/visibility/assign1.C
gcc/testsuite/g++.dg/ext/visibility/class1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/visibility/fvisibility-override2.C
gcc/testsuite/g++.dg/ext/visibility/prop1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/visibility/redecl1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/visibility/template1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/visibility/template2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/visibility/template3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/visibility/template4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/visibility/typeinfo1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/visibility/virtual.C
gcc/testsuite/g++.dg/ext/visibility/warn1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/visibility/warn2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/visibility/warn3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/visibility/warn4.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/enum5.C
gcc/tree.c
gcc/tree.h
gcc/varasm.c