* [Bug target/31903] unwanted anonymous namespacing linkage
2007-05-11 21:15 [Bug c++/31903] New: unwanted anonymous namespacing linkage mrs at apple dot com
@ 2007-05-11 21:20 ` pinskia at gcc dot gnu dot org
2007-05-11 21:25 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-11 21:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-05-11 22:20 -------
This works correctly on i686-Linux-gnu in 4.2.0.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |target
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31903
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/31903] unwanted anonymous namespacing linkage
2007-05-11 21:15 [Bug c++/31903] New: unwanted anonymous namespacing linkage mrs at apple dot com
2007-05-11 21:20 ` [Bug target/31903] " pinskia at gcc dot gnu dot org
@ 2007-05-11 21:25 ` pinskia at gcc dot gnu dot org
2007-05-11 21:45 ` mrs at apple dot com
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-11 21:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-05-11 22:25 -------
debian:~> ~/x86-local-fsf/bin/g++ -c -o t1.o t.cc
debian:~> ~/x86-local-fsf/bin/g++ -c -o t2.o t.cc -DFOO
debian:~> ~/x86-local-fsf/bin/g++ t1.o t2.o
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31903
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/31903] unwanted anonymous namespacing linkage
2007-05-11 21:15 [Bug c++/31903] New: unwanted anonymous namespacing linkage mrs at apple dot com
2007-05-11 21:20 ` [Bug target/31903] " pinskia at gcc dot gnu dot org
2007-05-11 21:25 ` pinskia at gcc dot gnu dot org
@ 2007-05-11 21:45 ` mrs at apple dot com
2007-05-11 21:55 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mrs at apple dot com @ 2007-05-11 21:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from mrs at apple dot com 2007-05-11 22:44 -------
I think this is a bug on Linux as well, though, I suspect it don't fail to
build, but rather I think it will compare the two typeinfo objects as equal
even though they are unrelated to each other.
--
mrs at apple dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mrs at apple dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31903
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/31903] unwanted anonymous namespacing linkage
2007-05-11 21:15 [Bug c++/31903] New: unwanted anonymous namespacing linkage mrs at apple dot com
` (2 preceding siblings ...)
2007-05-11 21:45 ` mrs at apple dot com
@ 2007-05-11 21:55 ` pinskia at gcc dot gnu dot org
2007-05-11 23:01 ` mrs at apple dot com
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-11 21:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-05-11 22:55 -------
(In reply to comment #3)
> I think this is a bug on Linux as well, though, I suspect it don't fail to
> build, but rather I think it will compare the two typeinfo objects as equal
> even though they are unrelated to each other.
Nope:
Y:
.long _ZTIN33_GLOBAL__N_t.cc_00000000_E25ADE893fooE
X:
.long _ZTIN33_GLOBAL__N_t.cc_00000000_1F13DE273fooE
So the typeinfo are different.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31903
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/31903] unwanted anonymous namespacing linkage
2007-05-11 21:15 [Bug c++/31903] New: unwanted anonymous namespacing linkage mrs at apple dot com
` (3 preceding siblings ...)
2007-05-11 21:55 ` pinskia at gcc dot gnu dot org
@ 2007-05-11 23:01 ` mrs at apple dot com
2007-05-12 0:00 ` sabre at nondot dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mrs at apple dot com @ 2007-05-11 23:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from mrs at apple dot com 2007-05-12 00:00 -------
Odd, I see:
X:
.long _ZTIN12_GLOBAL__N_13fooE
.weak _ZTSN12_GLOBAL__N_13fooE
.section .gnu.linkonce.r._ZTSN12_GLOBAL__N_13fooE,"a",@progbits
.type _ZTSN12_GLOBAL__N_13fooE, @object
.size _ZTSN12_GLOBAL__N_13fooE, 21
_ZTSN12_GLOBAL__N_13fooE:
.string "N12_GLOBAL__N_13fooE"
on my darwin->i386-unknown-linux-gnu compiler?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31903
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/31903] unwanted anonymous namespacing linkage
2007-05-11 21:15 [Bug c++/31903] New: unwanted anonymous namespacing linkage mrs at apple dot com
` (4 preceding siblings ...)
2007-05-11 23:01 ` mrs at apple dot com
@ 2007-05-12 0:00 ` sabre at nondot dot org
2007-05-12 13:16 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sabre at nondot dot org @ 2007-05-12 0:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from sabre at nondot dot org 2007-05-12 01:00 -------
The real bug here is that they are not getting internal linkage. Just
uniquing/randifying the names would allow them to link, but could be a perf
issue (more symbols for the static/dynamic linker).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31903
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/31903] unwanted anonymous namespacing linkage
2007-05-11 21:15 [Bug c++/31903] New: unwanted anonymous namespacing linkage mrs at apple dot com
` (5 preceding siblings ...)
2007-05-12 0:00 ` sabre at nondot dot org
@ 2007-05-12 13:16 ` pinskia at gcc dot gnu dot org
2007-05-12 13:31 ` [Bug c++/31903] [4.3 Regression] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-12 13:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2007-05-12 14:15 -------
(In reply to comment #5)
> on my darwin->i386-unknown-linux-gnu compiler?
It might be because I am using a binutils which has comdat support which is
detected by configure and you did not build a binutils so there is no comdat
support enabled.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31903
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/31903] [4.3 Regression] unwanted anonymous namespacing linkage
2007-05-11 21:15 [Bug c++/31903] New: unwanted anonymous namespacing linkage mrs at apple dot com
` (6 preceding siblings ...)
2007-05-12 13:16 ` pinskia at gcc dot gnu dot org
@ 2007-05-12 13:31 ` pinskia at gcc dot gnu dot org
2007-05-13 22:18 ` geoffk at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-12 13:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gcc dot gnu dot org 2007-05-12 14:30 -------
The name still has to be unque'd for many different reasons.
Anyways this is caused by:
http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00209.html
And if I read the dates correctly, this is only on the trunk and not in 4.2.0:
r118360 | geoffk | 2006-10-31 21:06:12 -0800 (Tue, 31 Oct 2006) | 23 lines
+-- GCC 4.2 branch created ------+
| (Oct 20 2006)
So I can only assume Geoff applied this to your local 4.2 branch.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |geoffk at gcc dot gnu dot
| |org
Severity|normal |blocker
Status|UNCONFIRMED |NEW
Component|target |c++
Ever Confirmed|0 |1
Keywords| |link-failure, wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2007-05-12 14:30:49
date| |
Summary|unwanted anonymous |[4.3 Regression] unwanted
|namespacing linkage |anonymous namespacing
| |linkage
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31903
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/31903] [4.3 Regression] unwanted anonymous namespacing linkage
2007-05-11 21:15 [Bug c++/31903] New: unwanted anonymous namespacing linkage mrs at apple dot com
` (7 preceding siblings ...)
2007-05-12 13:31 ` [Bug c++/31903] [4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-05-13 22:18 ` geoffk at gcc dot gnu dot org
2007-06-13 22:31 ` [Bug c++/31903] [4.3 Regression] typeinfo of classes in anon namespace isn't being marked static geoffk at gcc dot gnu dot org
2007-06-14 21:11 ` geoffk at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2007-05-13 22:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from geoffk at gcc dot gnu dot org 2007-05-13 23:18 -------
No DECL whose mangled name includes the name of an anonymous namespace should
be TREE_PUBLIC. That is the bug here.
There are no problems with typeinfo on systems where typeinfo is compared by
address, which includes Linux and Darwin. On other systems you'll notice that
the symbols are uniqued.
I don't believe there are any reasons why the names have to be unique on these
systems. Andrew, if you know some reasons, it would help if you listed them.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31903
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/31903] [4.3 Regression] typeinfo of classes in anon namespace isn't being marked static
2007-05-11 21:15 [Bug c++/31903] New: unwanted anonymous namespacing linkage mrs at apple dot com
` (8 preceding siblings ...)
2007-05-13 22:18 ` geoffk at gcc dot gnu dot org
@ 2007-06-13 22:31 ` geoffk at gcc dot gnu dot org
2007-06-14 21:11 ` geoffk at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2007-06-13 22:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from geoffk at gcc dot gnu dot org 2007-06-13 22:31 -------
I think this problem is limited to just typeinfo.
--
geoffk at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |geoffk at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2007-05-12 14:30:49 |2007-06-13 22:31:14
date| |
Summary|[4.3 Regression] unwanted |[4.3 Regression] typeinfo of
|anonymous namespacing |classes in anon namespace
|linkage |isn't being marked static
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31903
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/31903] [4.3 Regression] typeinfo of classes in anon namespace isn't being marked static
2007-05-11 21:15 [Bug c++/31903] New: unwanted anonymous namespacing linkage mrs at apple dot com
` (9 preceding siblings ...)
2007-06-13 22:31 ` [Bug c++/31903] [4.3 Regression] typeinfo of classes in anon namespace isn't being marked static geoffk at gcc dot gnu dot org
@ 2007-06-14 21:11 ` geoffk at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2007-06-14 21:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from geoffk at gcc dot gnu dot org 2007-06-14 21:11 -------
Should be fixed with this change:
------------------------------------------------------------------------
r125721 | geoffk | 2007-06-14 13:56:25 -0700 (Thu, 14 Jun 2007) | 4 lines
PR 31093
* decl2.c (determine_visibility): Remove duplicate code for
handling type info.
--
geoffk at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31903
^ permalink raw reply [flat|nested] 12+ messages in thread