public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/32470] New: fvisibility=hidden without effect in some casses
@ 2007-06-23 3:46 gd at spherenet dot de
2007-06-24 0:53 ` [Bug c++/32470] " pinskia at gcc dot gnu dot org
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: gd at spherenet dot de @ 2007-06-23 3:46 UTC (permalink / raw)
To: gcc-bugs
Compiling the following code with fvisibility=hidden exports Test::test().
(The used compiler is 4.2.1 20070622. Version 4.2.0 on a i686 gives the same
results).
~$ cat test.cc
#include <streambuf>
class Test
{
void test();
};
void Test::test() { }
~$ g++ -fvisibility=hidden -fPIC -c -o test.o test.cc
~$ readelf -s test.o
Symbol table '.symtab' contains 12 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FILE LOCAL DEFAULT ABS test.cc
2: 0000000000000000 0 SECTION LOCAL DEFAULT 1
3: 0000000000000000 0 SECTION LOCAL DEFAULT 2
4: 0000000000000000 0 SECTION LOCAL DEFAULT 3
5: 0000000000000000 0 SECTION LOCAL DEFAULT 4
6: 0000000000000000 0 SECTION LOCAL DEFAULT 6
7: 0000000000000000 0 SECTION LOCAL DEFAULT 9
8: 0000000000000000 0 SECTION LOCAL DEFAULT 8
9: 0000000000000000 10 FUNC GLOBAL DEFAULT 1 _ZN4Test4testEv
10: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __gxx_personality_v0
11: 0000000000000000 8 OBJECT WEAK HIDDEN 6
DW.ref.__gxx_personality_
After removing #include <streambuf> from the testcase, Test::test() is hidden
as expected.
~$ g++ -fvisibility=hidden -fPIC -c -o test.o test.cc
~$ readelf -s test.o
Symbol table '.symtab' contains 12 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FILE LOCAL DEFAULT ABS test.cc
2: 0000000000000000 0 SECTION LOCAL DEFAULT 1
3: 0000000000000000 0 SECTION LOCAL DEFAULT 2
4: 0000000000000000 0 SECTION LOCAL DEFAULT 3
5: 0000000000000000 0 SECTION LOCAL DEFAULT 4
6: 0000000000000000 0 SECTION LOCAL DEFAULT 6
7: 0000000000000000 0 SECTION LOCAL DEFAULT 9
8: 0000000000000000 0 SECTION LOCAL DEFAULT 8
9: 0000000000000000 10 FUNC GLOBAL HIDDEN 1 _ZN4Test4testEv
10: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __gxx_personality_v0
11: 0000000000000000 8 OBJECT WEAK HIDDEN 6
DW.ref.__gxx_personality_
--
Summary: fvisibility=hidden without effect in some casses
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gd at spherenet dot de
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] fvisibility=hidden without effect in some casses
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
@ 2007-06-24 0:53 ` pinskia at gcc dot gnu dot org
2007-06-25 23:38 ` gd at spherenet dot de
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-24 0:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-06-24 00:53 -------
I can reproduce this, I am in the middle of reducing it, it is an interaction
between friends, extern templates and visibility attribute on namespaces.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] fvisibility=hidden without effect in some casses
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
2007-06-24 0:53 ` [Bug c++/32470] " pinskia at gcc dot gnu dot org
@ 2007-06-25 23:38 ` gd at spherenet dot de
2007-07-02 15:01 ` [Bug c++/32470] fvisibility=hidden without effect in some cases gd at spherenet dot de
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: gd at spherenet dot de @ 2007-06-25 23:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from gd at spherenet dot de 2007-06-25 23:38 -------
Here is the reduced testcase which shows the bug:
=============
namespace std __attribute__((__visibility__("default"))) {
template<typename _CharT>
class basic_streambuf
{
friend void getline();
};
extern template class basic_streambuf<char>;
}
class Test
{
void test();
};
void Test::test() { }
==============
The extern declaration triggers instantiate_class_template (pt.c) before the
scope of the namespace is left and its visibility popped. While handling the
friend declaration, we push into the namespace's scope a second time which
clears its has_visibility flag. Hence, the visibility is not popped when we
finally leave the namespace.
What about the following patch proposal:
* cp/name-lookup.c (push_namespace_with_attribs) Do not clear the
has_visibility flag when entering a namespace's scope, ...
(leave_scope) ... but when leaving
--- gcc-4_2-branch/gcc/cp/name-lookup.c (revision 126002)
+++ gcc-4_2-branch/gcc/cp/name-lookup.c (working copy)
@@ -1350,7 +1350,12 @@
#ifdef HANDLE_PRAGMA_VISIBILITY
if (scope->has_visibility)
- pop_visibility ();
+ {
+ pop_visibility ();
+ /* Clear has_visibility in case the next namespace-definition has
+ no visibility attribute. */
+ scope->has_visibility = 0;
+ }
#endif
/* Move one nesting level up. */
@@ -3067,9 +3072,6 @@
current_namespace = d;
#ifdef HANDLE_PRAGMA_VISIBILITY
- /* Clear has_visibility in case a previous namespace-definition had a
- visibility attribute and this one doesn't. */
- current_binding_level->has_visibility = 0;
for (d = attributes; d; d = TREE_CHAIN (d))
{
tree name = TREE_PURPOSE (d);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] fvisibility=hidden without effect in some cases
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
2007-06-24 0:53 ` [Bug c++/32470] " pinskia at gcc dot gnu dot org
2007-06-25 23:38 ` gd at spherenet dot de
@ 2007-07-02 15:01 ` gd at spherenet dot de
2007-09-11 22:38 ` mueller at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: gd at spherenet dot de @ 2007-07-02 15:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from gd at spherenet dot de 2007-07-02 15:01 -------
Ping.
Is there any reason why this one is still unconfirmed? It could be reproduced
by Andrew.
--
gd at spherenet dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|fvisibility=hidden without |fvisibility=hidden without
|effect in some casses |effect in some cases
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] fvisibility=hidden without effect in some cases
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
` (2 preceding siblings ...)
2007-07-02 15:01 ` [Bug c++/32470] fvisibility=hidden without effect in some cases gd at spherenet dot de
@ 2007-09-11 22:38 ` mueller at gcc dot gnu dot org
2007-09-11 22:39 ` [Bug c++/32470] [4.2 regression] " mueller at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mueller at gcc dot gnu dot org @ 2007-09-11 22:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mueller at gcc dot gnu dot org 2007-09-11 22:37 -------
I can confirm it as well
--
mueller at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-09-11 22:37:55
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] [4.2 regression] fvisibility=hidden without effect in some cases
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
` (3 preceding siblings ...)
2007-09-11 22:38 ` mueller at gcc dot gnu dot org
@ 2007-09-11 22:39 ` mueller at gcc dot gnu dot org
2007-09-26 19:15 ` [Bug c++/32470] [4.2/4.3 " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mueller at gcc dot gnu dot org @ 2007-09-11 22:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from mueller at gcc dot gnu dot org 2007-09-11 22:39 -------
*** Bug 33399 has been marked as a duplicate of this bug. ***
--
mueller at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mueller at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] [4.2/4.3 regression] fvisibility=hidden without effect in some cases
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
` (4 preceding siblings ...)
2007-09-11 22:39 ` [Bug c++/32470] [4.2 regression] " mueller at gcc dot gnu dot org
@ 2007-09-26 19:15 ` pinskia at gcc dot gnu dot org
2007-09-28 3:55 ` mmitchel at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-09-26 19:15 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.2 regression] |[4.2/4.3 regression]
|fvisibility=hidden without |fvisibility=hidden without
|effect in some cases |effect in some cases
Target Milestone|--- |4.2.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] [4.2/4.3 regression] fvisibility=hidden without effect in some cases
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
` (5 preceding siblings ...)
2007-09-26 19:15 ` [Bug c++/32470] [4.2/4.3 " pinskia at gcc dot gnu dot org
@ 2007-09-28 3:55 ` mmitchel at gcc dot gnu dot org
2007-10-01 14:42 ` gd at spherenet dot de
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-09-28 3:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from mmitchel at gcc dot gnu dot org 2007-09-28 03:55 -------
Andrew, thanks for the analysis. But, I'm not very happy with the patch. Can
we change the compiler so that we set has_visibility on a binding level when
the binding level is created -- and never reset it, ever?
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] [4.2/4.3 regression] fvisibility=hidden without effect in some cases
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
` (6 preceding siblings ...)
2007-09-28 3:55 ` mmitchel at gcc dot gnu dot org
@ 2007-10-01 14:42 ` gd at spherenet dot de
2007-10-04 1:31 ` jason at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: gd at spherenet dot de @ 2007-10-01 14:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from gd at spherenet dot de 2007-10-01 14:42 -------
Just to be sure I understood everything correctly. Assume the following code:
namespace foo __attribute__((__visibility__("default"))) {
...
}
namespace foo {
...
}
The same binding level is used for both namespace definitions, but visibility
is pushed/popped only when entering/leaving the scope of the first definition.
The only purpose of has_visibility is to indicate that visibility was pushed
for the current namespace definition and needs to be popped when leaving. Yes?
Then we have to reset the has_visibility flag (or drop the flag and find
another way to signal that visibility needs to be popped).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] [4.2/4.3 regression] fvisibility=hidden without effect in some cases
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
` (7 preceding siblings ...)
2007-10-01 14:42 ` gd at spherenet dot de
@ 2007-10-04 1:31 ` jason at gcc dot gnu dot org
2007-10-04 8:48 ` jason at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-10-04 1: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|2007-09-11 22:37:55 |2007-10-04 01:30:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] [4.2/4.3 regression] fvisibility=hidden without effect in some cases
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
` (8 preceding siblings ...)
2007-10-04 1:31 ` jason at gcc dot gnu dot org
@ 2007-10-04 8:48 ` jason at gcc dot gnu dot org
2007-10-04 8:51 ` [Bug c++/32470] [4.2 " jason at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-10-04 8:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jason at gcc dot gnu dot org 2007-10-04 08:48 -------
Subject: Bug 32470
Author: jason
Date: Thu Oct 4 08:48:23 2007
New Revision: 129003
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129003
Log:
PR c++/32470
* name-lookup.c (push_namespace_with_attrs): Fold back into...
(push_namespace): Here.
(handle_namespace_attrs): New fn for the attr code.
(leave_scope): Don't pop_visibility.
* name-lookup.h (struct cp_binding_level): Remove has_visibility.
* parser.c (cp_parser_namespace_definition): Call
handle_namespace_attrs and pop_visibility as appropriate.
Added:
trunk/gcc/testsuite/g++.dg/ext/visibility/namespace2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/name-lookup.c
trunk/gcc/cp/name-lookup.h
trunk/gcc/cp/parser.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] [4.2 regression] fvisibility=hidden without effect in some cases
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
` (9 preceding siblings ...)
2007-10-04 8:48 ` jason at gcc dot gnu dot org
@ 2007-10-04 8:51 ` jason at gcc dot gnu dot org
2007-10-09 19:30 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-10-04 8:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jason at gcc dot gnu dot org 2007-10-04 08:50 -------
Fixed for 4.3.0.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work|4.1.2 |4.1.2 4.3.0
Summary|[4.2/4.3 regression] |[4.2 regression]
|fvisibility=hidden without |fvisibility=hidden without
|effect in some cases |effect in some cases
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] [4.2 regression] fvisibility=hidden without effect in some cases
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
` (10 preceding siblings ...)
2007-10-04 8:51 ` [Bug c++/32470] [4.2 " jason at gcc dot gnu dot org
@ 2007-10-09 19:30 ` mmitchel at gcc dot gnu dot org
2007-10-09 20:53 ` jason at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-10-09 19:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from mmitchel at gcc dot gnu dot org 2007-10-09 19:20 -------
Change target milestone to 4.2.3, as 4.2.2 has been released.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.2.2 |4.2.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] [4.2 regression] fvisibility=hidden without effect in some cases
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
` (11 preceding siblings ...)
2007-10-09 19:30 ` mmitchel at gcc dot gnu dot org
@ 2007-10-09 20:53 ` jason at gcc dot gnu dot org
2007-10-09 21:10 ` jason at gcc dot gnu dot org
2007-10-22 18:13 ` jason at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-10-09 20:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jason at gcc dot gnu dot org 2007-10-09 20:52 -------
Subject: Bug 32470
Author: jason
Date: Tue Oct 9 20:52:24 2007
New Revision: 129180
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129180
Log:
PR c++/32470
* name-lookup.c (push_namespace_with_attrs): Fold back into...
(push_namespace): Here.
(handle_namespace_attrs): New fn for the attr code.
(leave_scope): Don't pop_visibility.
* name-lookup.h (struct cp_binding_level): Remove has_visibility.
* parser.c (cp_parser_namespace_definition): Call
handle_namespace_attrs and pop_visibility as appropriate.
PR c++/33094
* decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
constant to not have DECL_EXTERNAL if it's file-local.
Added:
branches/gcc-4_2-branch/gcc/testsuite/g++.dg/ext/visibility/anon6.C
- copied unchanged from r128890,
trunk/gcc/testsuite/g++.dg/ext/visibility/anon6.C
branches/gcc-4_2-branch/gcc/testsuite/g++.dg/ext/visibility/namespace2.C
- copied unchanged from r129003,
trunk/gcc/testsuite/g++.dg/ext/visibility/namespace2.C
Modified:
branches/gcc-4_2-branch/gcc/cp/ChangeLog
branches/gcc-4_2-branch/gcc/cp/decl.c
branches/gcc-4_2-branch/gcc/cp/name-lookup.c
branches/gcc-4_2-branch/gcc/cp/name-lookup.h
branches/gcc-4_2-branch/gcc/cp/parser.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] [4.2 regression] fvisibility=hidden without effect in some cases
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
` (12 preceding siblings ...)
2007-10-09 20:53 ` jason at gcc dot gnu dot org
@ 2007-10-09 21:10 ` jason at gcc dot gnu dot org
2007-10-22 18:13 ` jason at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-10-09 21:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from jason at gcc dot gnu dot org 2007-10-09 21:10 -------
Fixed for 4.2.3.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/32470] [4.2 regression] fvisibility=hidden without effect in some cases
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
` (13 preceding siblings ...)
2007-10-09 21:10 ` jason at gcc dot gnu dot org
@ 2007-10-22 18:13 ` jason at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-10-22 18:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from jason at gcc dot gnu dot org 2007-10-22 18:12 -------
Subject: Bug 32470
Author: jason
Date: Mon Oct 22 18:12:36 2007
New Revision: 129554
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129554
Log:
PR c++/32470
* name-lookup.c (push_namespace_with_attrs): Fold back into...
(push_namespace): Here.
(handle_namespace_attrs): New fn for the attr code.
(leave_scope): Don't pop_visibility.
* name-lookup.h (struct cp_binding_level): Remove has_visibility.
* parser.c (cp_parser_namespace_definition): Call
handle_namespace_attrs and pop_visibility as appropriate.
PR c++/33094
* decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
constant to not have DECL_EXTERNAL if it's file-local.
* decl2.c (get_guard): Copy visibility from the guarded variable.
PR c++/29365
* pt.c (outermost_tinst_level): New function.
* lex.c (in_main_input_context): New function.
* decl2.c (constrain_class_visibility): Use it to avoid warning
about uses of the anonymous namespace in the main input file.
Modified:
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/lex.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
branches/redhat/gcc-4_1-branch/gcc/cp/pt.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32470
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2007-10-22 18:13 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-23 3:46 [Bug c++/32470] New: fvisibility=hidden without effect in some casses gd at spherenet dot de
2007-06-24 0:53 ` [Bug c++/32470] " pinskia at gcc dot gnu dot org
2007-06-25 23:38 ` gd at spherenet dot de
2007-07-02 15:01 ` [Bug c++/32470] fvisibility=hidden without effect in some cases gd at spherenet dot de
2007-09-11 22:38 ` mueller at gcc dot gnu dot org
2007-09-11 22:39 ` [Bug c++/32470] [4.2 regression] " mueller at gcc dot gnu dot org
2007-09-26 19:15 ` [Bug c++/32470] [4.2/4.3 " pinskia at gcc dot gnu dot org
2007-09-28 3:55 ` mmitchel at gcc dot gnu dot org
2007-10-01 14:42 ` gd at spherenet dot de
2007-10-04 1:31 ` jason at gcc dot gnu dot org
2007-10-04 8:48 ` jason at gcc dot gnu dot org
2007-10-04 8:51 ` [Bug c++/32470] [4.2 " jason at gcc dot gnu dot org
2007-10-09 19:30 ` mmitchel at gcc dot gnu dot org
2007-10-09 20:53 ` jason at gcc dot gnu dot org
2007-10-09 21:10 ` jason at gcc dot gnu dot org
2007-10-22 18:13 ` jason 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).