[Bug c++/21764] visibility attributes on namespace scope
jakub at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Aug 28 12:22:00 GMT 2006
------- Comment #13 from jakub at gcc dot gnu dot org 2006-08-28 12:22 -------
Subject: Bug 21764
Author: jakub
Date: Mon Aug 28 12:22:14 2006
New Revision: 116504
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116504
Log:
2006-03-20 Jason Merrill <jason@redhat.com>
PR c++/21764
* c-pragma.c (visstack): Move out of handle_pragma_visibility.
(push_visibility, pop_visibility): Likewise.
* c-pragma.h: Declare them.
cp/
PR c++/21764, c++/19238
* decl.c (cp_finish_decl): Call determine_visibility later.
(start_preparsed_function): Likewise.
* cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
(TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
* name-lookup.h (struct cp_binding_level): Add has_visibility
bitfield.
* name-lookup.c: Include c-pragma.h.
(push_namespace_with_attribs): Split out from push_namespace.
Push visibility if appropriate. Set TREE_PUBLIC on namespaces.
(leave_scope): Pop visibility if appropriate.
* decl2.c (determine_visibility_from_class): Split out from...
(determine_visibility): ...here. Handle function scope and
nested classes.
(import_export_decl): Move visibility handling to
determine_visibility_from_class.
* parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
attributes on namespace declarations.
Added:
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/local1.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/namespace1.C
Modified:
branches/redhat/gcc-4_1-branch/gcc/ChangeLog
branches/redhat/gcc-4_1-branch/gcc/c-pragma.c
branches/redhat/gcc-4_1-branch/gcc/c-pragma.h
branches/redhat/gcc-4_1-branch/gcc/cp/ChangeLog
branches/redhat/gcc-4_1-branch/gcc/cp/cp-tree.h
branches/redhat/gcc-4_1-branch/gcc/cp/decl.c
branches/redhat/gcc-4_1-branch/gcc/cp/decl2.c
branches/redhat/gcc-4_1-branch/gcc/cp/name-lookup.c
branches/redhat/gcc-4_1-branch/gcc/cp/name-lookup.h
branches/redhat/gcc-4_1-branch/gcc/cp/parser.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21764
More information about the Gcc-bugs
mailing list