public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
@ 2005-12-12 17:22 ` bkoz at gcc dot gnu dot org
2005-12-12 17:37 ` gdr at integrable-solutions dot net
` (13 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2005-12-12 17:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from bkoz at gcc dot gnu dot org 2005-12-12 17:22 -------
There is a feature request to assign visibility attributes to namespaces. If
this is done, then making anonymous namespaces hidden will just be a sub-class
of that work.
That enhancement request is
c++/21764
Some of the semantics need to be fleshed out concretely, and behavior decided.
-benjamin
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
2005-12-12 17:22 ` [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility bkoz at gcc dot gnu dot org
@ 2005-12-12 17:37 ` gdr at integrable-solutions dot net
2006-03-13 1:42 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: gdr at integrable-solutions dot net @ 2005-12-12 17:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from gdr at integrable-solutions dot net 2005-12-12 17:37 -------
Subject: Re: (optimisation) Functions in anonymous namespaces should default
to "hidden" visibility
"bkoz at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| There is a feature request to assign visibility attributes to
| namespaces. If this is done, then making anonymous namespaces hidden
| will just be a sub-class of that work.
|
| That enhancement request is
|
| c++/21764
|
| Some of the semantics need to be fleshed out concretely, and
| behavior decided.
I agree.
Independently of the visvibility issue, GCC can make some other entities
have internal linkage from the assembler/linker point of view (not C++
source point of view).
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
2005-12-12 17:22 ` [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility bkoz at gcc dot gnu dot org
2005-12-12 17:37 ` gdr at integrable-solutions dot net
@ 2006-03-13 1:42 ` pinskia at gcc dot gnu dot org
2006-03-20 21:11 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-13 1:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pinskia at gcc dot gnu dot org 2006-03-13 01:41 -------
Related to PR 10591.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |10591
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-03-13 1:42 ` pinskia at gcc dot gnu dot org
@ 2006-03-20 21:11 ` pinskia at gcc dot gnu dot org
2006-03-21 14:31 ` jason at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-20 21:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from pinskia at gcc dot gnu dot org 2006-03-20 21:11 -------
*** Bug 26770 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2006-03-20 21:11 ` pinskia at gcc dot gnu dot org
@ 2006-03-21 14:31 ` jason at gcc dot gnu dot org
2006-03-21 16:15 ` jason at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: jason at gcc dot gnu dot org @ 2006-03-21 14:31 UTC (permalink / raw)
To: gcc-bugs
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2005-09-30 05:14:50 |2006-03-21 14:31:18
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2006-03-21 14:31 ` jason at gcc dot gnu dot org
@ 2006-03-21 16:15 ` jason at gcc dot gnu dot org
2006-03-21 17:01 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: jason at gcc dot gnu dot org @ 2006-03-21 16:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jason at gcc dot gnu dot org 2006-03-21 16:15 -------
Subject: Bug 21581
Author: jason
Date: Tue Mar 21 16:15:25 2006
New Revision: 112250
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112250
Log:
PR c++/21581
* parser.c (cp_parser_declaration): Support attributes on
anonymous namespaces.
* name-lookup.c (push_namespace_with_attribs): Anonymous
namespaces default to hidden visibility.
Added:
trunk/gcc/testsuite/g++.dg/ext/visibility/anon1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/name-lookup.c
trunk/gcc/cp/parser.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2006-03-21 16:15 ` jason at gcc dot gnu dot org
@ 2006-03-21 17:01 ` pinskia at gcc dot gnu dot org
2006-03-21 18:03 ` sabre at nondot dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-21 17:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from pinskia at gcc dot gnu dot org 2006-03-21 17:01 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2006-03-21 17:01 ` pinskia at gcc dot gnu dot org
@ 2006-03-21 18:03 ` sabre at nondot dot org
2006-03-21 18:05 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: sabre at nondot dot org @ 2006-03-21 18:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from sabre at nondot dot org 2006-03-21 18:03 -------
Pardon the potentially silly question here, but why 'hidden'? Why not
TREE_PUBLIC(decl) = 0? It seems that members of anonymous namespaces should be
completely internal, and not depend on platform support for hidden visibility.
If I understand correctly, marking something hidden places more slightly more
burden on the static linker than marking it internal, and not all platforms
support hidden.
Should I (re)open a new bug for to request TREE_PUBLIC(decl) = 0 behavior?
-Chris
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2006-03-21 18:03 ` sabre at nondot dot org
@ 2006-03-21 18:05 ` pinskia at gcc dot gnu dot org
2006-03-21 18:06 ` sabre at nondot dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-21 18:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from pinskia at gcc dot gnu dot org 2006-03-21 18:05 -------
(In reply to comment #13)
> Should I (re)open a new bug for to request TREE_PUBLIC(decl) = 0 behavior?
PR 10591 is for that issue.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2006-03-21 18:05 ` pinskia at gcc dot gnu dot org
@ 2006-03-21 18:06 ` sabre at nondot dot org
2006-04-05 22:20 ` jason at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: sabre at nondot dot org @ 2006-03-21 18:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from sabre at nondot dot org 2006-03-21 18:06 -------
Great, thanks!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2006-03-21 18:06 ` sabre at nondot dot org
@ 2006-04-05 22:20 ` jason at gcc dot gnu dot org
2006-04-07 6:33 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: jason at gcc dot gnu dot org @ 2006-04-05 22:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from jason at gcc dot gnu dot org 2006-04-05 22:20 -------
Can't fix until more basic problems are resolved.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2006-04-05 22:20 ` jason at gcc dot gnu dot org
@ 2006-04-07 6:33 ` pinskia at gcc dot gnu dot org
2006-06-30 1:17 ` jason at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-07 6:33 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
` (11 preceding siblings ...)
2006-04-07 6:33 ` pinskia at gcc dot gnu dot org
@ 2006-06-30 1:17 ` jason at gcc dot gnu dot org
2006-06-30 15:29 ` pinskia at gcc dot gnu dot org
2006-08-28 12:29 ` jakub at gcc dot gnu dot org
14 siblings, 0 replies; 21+ messages in thread
From: jason at gcc dot gnu dot org @ 2006-06-30 1:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from jason at gcc dot gnu dot org 2006-06-30 01:16 -------
Subject: Bug 21581
Author: jason
Date: Fri Jun 30 01:15:56 2006
New Revision: 115086
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115086
Log:
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.
Added:
trunk/gcc/testsuite/g++.dg/ext/visibility/anon2.C
trunk/gcc/testsuite/g++.dg/ext/visibility/class1.C
trunk/gcc/testsuite/g++.dg/ext/visibility/prop1.C
trunk/gcc/testsuite/g++.dg/ext/visibility/redecl1.C
trunk/gcc/testsuite/g++.dg/ext/visibility/template1.C
trunk/gcc/testsuite/g++.dg/ext/visibility/template2.C
trunk/gcc/testsuite/g++.dg/ext/visibility/template3.C
trunk/gcc/testsuite/g++.dg/ext/visibility/template4.C
trunk/gcc/testsuite/g++.dg/ext/visibility/typeinfo1.C
trunk/gcc/testsuite/g++.dg/ext/visibility/warn1.C
trunk/gcc/testsuite/g++.dg/ext/visibility/warn2.C
trunk/gcc/testsuite/g++.dg/ext/visibility/warn3.C
trunk/gcc/testsuite/g++.dg/ext/visibility/warn4.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/attribs.c
trunk/gcc/c-common.c
trunk/gcc/c-decl.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/decl2.c
trunk/gcc/cp/name-lookup.c
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c
trunk/gcc/cp/rtti.c
trunk/gcc/cp/semantics.c
trunk/gcc/cp/tree.c
trunk/gcc/doc/extend.texi
trunk/gcc/doc/invoke.texi
trunk/gcc/flags.h
trunk/gcc/testsuite/g++.dg/ext/attrib14.C
trunk/gcc/testsuite/g++.dg/ext/attrib9.C
trunk/gcc/testsuite/g++.dg/ext/visibility/anon1.C
trunk/gcc/testsuite/g++.dg/ext/visibility/assign1.C
trunk/gcc/testsuite/g++.dg/ext/visibility/fvisibility-override2.C
trunk/gcc/testsuite/g++.dg/ext/visibility/virtual.C
trunk/gcc/testsuite/g++.old-deja/g++.pt/enum5.C
trunk/gcc/tree.c
trunk/gcc/tree.h
trunk/gcc/varasm.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
` (12 preceding siblings ...)
2006-06-30 1:17 ` jason at gcc dot gnu dot org
@ 2006-06-30 15:29 ` pinskia at gcc dot gnu dot org
2006-08-28 12:29 ` jakub at gcc dot gnu dot org
14 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-30 15:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from pinskia at gcc dot gnu dot org 2006-06-30 15:28 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
` (13 preceding siblings ...)
2006-06-30 15:29 ` pinskia at gcc dot gnu dot org
@ 2006-08-28 12:29 ` jakub at gcc dot gnu dot org
14 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-08-28 12:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from jakub at gcc dot gnu dot org 2006-08-28 12:27 -------
Subject: Bug 21581
Author: jakub
Date: Mon Aug 28 12:26:41 2006
New Revision: 116505
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116505
Log:
2006-07-06 Jason Merrill <jason@redhat.com>
cp/
PR c++/28279
* decl2.c (finish_static_data_member_decl): Don't assert
TREE_PUBLIC.
2006-07-01 Jason Merrill <jason@redhat.com>
cp/
PR c++/28215
* method.c (make_thunk): Unset DECL_USE_TEMPLATE and
DECL_TEMPLATE_INFO.
2006-06-30 Jason Merrill <jason@redhat.com>
objcp/
* objcp-decl.c (objcp_start_struct): Pass null attributes argument
to begin_class_definition.
2006-06-29 Jason Merrill <jason@redhat.com>
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.
PR c++/26905
PR c++/21675
PR c++/17470
* attribs.c (decl_attributes): Ignore type-in-place attributes
once the type has been defined.
cp/
PR c++/26905
PR c++/26612
PR c++/27000
PR c++/26984
PR c++/19134
* 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.
* decl.c (cp_finish_decl): Call determine_visibility for function
decls, too.
* name-lookup.c (pushtag): Call determine_visibility.
* decl.c (duplicate_decls): Don't copy visibility from template to
specialization.
* pt.c (check_explicit_specialization): Likewise.
(lookup_template_class, tsubst_decl): Call determine_visibility.
* class.c (finish_struct_1): Call constrain_class_visibility.
PR c++/26905
PR c++/21675
PR c++/17470
* 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.
* semantics.c (begin_class_definition): Add attributes parameter,
apply them to the type.
PR c++/21581
PR c++/25915
* tree.c (decl_anon_ns_mem_p): New function.
* cp-tree.h: Declare it.
* decl2.c (determine_visibility): Make anonymous namespace
members static.
(min_vis_r, constrain_visibility): Likewise.
* rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
pseudo-types.
* decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
global_namespace.
* name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
on anonymous namespaces.
Added:
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/anon1.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/anon2.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/class1.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/prop1.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/redecl1.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/template1.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/template2.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/template3.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/template4.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/typeinfo1.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/warn1.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/warn2.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/warn3.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/warn4.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/template/anon2.C
Modified:
branches/redhat/gcc-4_1-branch/gcc/ChangeLog
branches/redhat/gcc-4_1-branch/gcc/attribs.c
branches/redhat/gcc-4_1-branch/gcc/c-common.c
branches/redhat/gcc-4_1-branch/gcc/c-decl.c
branches/redhat/gcc-4_1-branch/gcc/cp/ChangeLog
branches/redhat/gcc-4_1-branch/gcc/cp/class.c
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/method.c
branches/redhat/gcc-4_1-branch/gcc/cp/name-lookup.c
branches/redhat/gcc-4_1-branch/gcc/cp/parser.c
branches/redhat/gcc-4_1-branch/gcc/cp/pt.c
branches/redhat/gcc-4_1-branch/gcc/cp/rtti.c
branches/redhat/gcc-4_1-branch/gcc/cp/semantics.c
branches/redhat/gcc-4_1-branch/gcc/cp/tree.c
branches/redhat/gcc-4_1-branch/gcc/doc/extend.texi
branches/redhat/gcc-4_1-branch/gcc/doc/invoke.texi
branches/redhat/gcc-4_1-branch/gcc/flags.h
branches/redhat/gcc-4_1-branch/gcc/objcp/ChangeLog
branches/redhat/gcc-4_1-branch/gcc/objcp/objcp-decl.c
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/attrib14.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/attrib9.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/assign1.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/fvisibility-override2.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/visibility/virtual.C
branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.old-deja/g++.pt/enum5.C
branches/redhat/gcc-4_1-branch/gcc/tree.c
branches/redhat/gcc-4_1-branch/gcc/tree.h
branches/redhat/gcc-4_1-branch/gcc/varasm.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
2005-05-15 14:13 [Bug c++/21581] New: " arjanv at redhat dot com
` (4 preceding siblings ...)
2005-05-17 18:21 ` echristo at redhat dot com
@ 2005-05-26 14:46 ` jakub at gcc dot gnu dot org
5 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-05-26 14:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jakub at gcc dot gnu dot org 2005-05-26 14:45 -------
I think best would be to arrange for push_namespace that pushes anonymous
namespace to do equivalent of #pragma GCC visibility push(hidden)
and pop_namespace that leaves anonymous namespace to do equivalent of
#pragma GCC visibility pop(hidden).
That way users could override this if they want to.
Unfortunately this relies on H.J.'s > 16 visibility pragma nesting patch.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu dot org,
| |jason at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
2005-05-15 14:13 [Bug c++/21581] New: " arjanv at redhat dot com
` (3 preceding siblings ...)
2005-05-17 17:44 ` arjanv at redhat dot com
@ 2005-05-17 18:21 ` echristo at redhat dot com
2005-05-26 14:46 ` jakub at gcc dot gnu dot org
5 siblings, 0 replies; 21+ messages in thread
From: echristo at redhat dot com @ 2005-05-17 18:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From echristo at redhat dot com 2005-05-17 18:20 -------
After talking with jason I think this is a legitimate request.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-05-17 18:20:05
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
2005-05-15 14:13 [Bug c++/21581] New: " arjanv at redhat dot com
` (2 preceding siblings ...)
2005-05-17 17:34 ` arjanv at redhat dot com
@ 2005-05-17 17:44 ` arjanv at redhat dot com
2005-05-17 18:21 ` echristo at redhat dot com
2005-05-26 14:46 ` jakub at gcc dot gnu dot org
5 siblings, 0 replies; 21+ messages in thread
From: arjanv at redhat dot com @ 2005-05-17 17:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From arjanv at redhat dot com 2005-05-17 17:44 -------
As for andrews comment, the default could be hidden/private, where "export"
would override the default to be non-private.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
2005-05-15 14:13 [Bug c++/21581] New: " arjanv at redhat dot com
2005-05-15 14:21 ` [Bug c++/21581] " pinskia at gcc dot gnu dot org
2005-05-17 16:40 ` bangerth at dealii dot org
@ 2005-05-17 17:34 ` arjanv at redhat dot com
2005-05-17 17:44 ` arjanv at redhat dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 21+ messages in thread
From: arjanv at redhat dot com @ 2005-05-17 17:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From arjanv at redhat dot com 2005-05-17 17:33 -------
I think you mean bug 18267
However bug 18267 is about static versus non-static linkage.
What I'm suggesting is visibility attribute level, eg non-static but hidden
visibility.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
2005-05-15 14:13 [Bug c++/21581] New: " arjanv at redhat dot com
2005-05-15 14:21 ` [Bug c++/21581] " pinskia at gcc dot gnu dot org
@ 2005-05-17 16:40 ` bangerth at dealii dot org
2005-05-17 17:34 ` arjanv at redhat dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 21+ messages in thread
From: bangerth at dealii dot org @ 2005-05-17 16:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2005-05-17 16:39 -------
Andrew's argument has been made a number of times, and is considered
irrelevant
until someone actually comes around and implements the 'export' keyword.
This request is therefore definitely valid, but I close this PR since there
are other duplicates of this somewhere in the database.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility
2005-05-15 14:13 [Bug c++/21581] New: " arjanv at redhat dot com
@ 2005-05-15 14:21 ` pinskia at gcc dot gnu dot org
2005-05-17 16:40 ` bangerth at dealii dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-15 14:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-15 14:21 -------
I don't think this is valid and here is why:
anynymous namespace and still be used for templates and export so calling it from another shared
library is possible if we (GCC) implements export.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21581
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2006-08-28 12:28 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-21581-4603@http.gcc.gnu.org/bugzilla/>
2005-12-12 17:22 ` [Bug c++/21581] (optimisation) Functions in anonymous namespaces should default to "hidden" visibility bkoz at gcc dot gnu dot org
2005-12-12 17:37 ` gdr at integrable-solutions dot net
2006-03-13 1:42 ` pinskia at gcc dot gnu dot org
2006-03-20 21:11 ` pinskia at gcc dot gnu dot org
2006-03-21 14:31 ` jason at gcc dot gnu dot org
2006-03-21 16:15 ` jason at gcc dot gnu dot org
2006-03-21 17:01 ` pinskia at gcc dot gnu dot org
2006-03-21 18:03 ` sabre at nondot dot org
2006-03-21 18:05 ` pinskia at gcc dot gnu dot org
2006-03-21 18:06 ` sabre at nondot dot org
2006-04-05 22:20 ` jason at gcc dot gnu dot org
2006-04-07 6:33 ` pinskia at gcc dot gnu dot org
2006-06-30 1:17 ` jason at gcc dot gnu dot org
2006-06-30 15:29 ` pinskia at gcc dot gnu dot org
2006-08-28 12:29 ` jakub at gcc dot gnu dot org
2005-05-15 14:13 [Bug c++/21581] New: " arjanv at redhat dot com
2005-05-15 14:21 ` [Bug c++/21581] " pinskia at gcc dot gnu dot org
2005-05-17 16:40 ` bangerth at dealii dot org
2005-05-17 17:34 ` arjanv at redhat dot com
2005-05-17 17:44 ` arjanv at redhat dot com
2005-05-17 18:21 ` echristo at redhat dot com
2005-05-26 14:46 ` jakub at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).