public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34309] New: template variable not getting marked as weak when defined in pch
@ 2007-12-01 16:11 rbuergel at web dot de
2007-12-01 16:15 ` [Bug c++/34309] " rbuergel at web dot de
2007-12-08 20:29 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: rbuergel at web dot de @ 2007-12-01 16:11 UTC (permalink / raw)
To: gcc-bugs
this is an "enhanced" version of bug 24389.
The bug is still present, if the template variable is defined in a precompiled
header.
Testcase:
== header.h ==
#include <tr1/unordered_map>
== 1.cpp ==
#include "header.h"
== 2.cpp ==
#include "header.h"
int main(){}
compiling them:
g++ -c header.h
g++ 1.cpp 2.cpp
...gives us the known error:
/tmp/ccLfG2oZ.o:(.bss+0x0): multiple definition of `std::tr1::(anonymous
namespace)::ignore'
/tmp/ccqbV1zU.o:(.bss+0x0): first defined here
/tmp/ccLfG2oZ.o:(.bss+0x1): multiple definition of
`std::tr1::placeholders::(anonymous namespace)::_1'
/tmp/ccqbV1zU.o:(.bss+0x1): first defined here
/tmp/ccLfG2oZ.o:(.bss+0x2): multiple definition of
`std::tr1::placeholders::(anonymous namespace)::_2'
/tmp/ccqbV1zU.o:(.bss+0x2): first defined here
/tmp/ccLfG2oZ.o:(.bss+0x3): multiple definition of
`std::tr1::placeholders::(anonymous namespace)::_3'
/tmp/ccqbV1zU.o:(.bss+0x3): first defined here
/tmp/ccLfG2oZ.o:(.bss+0x4): multiple definition of
`std::tr1::placeholders::(anonymous namespace)::_4'
/tmp/ccqbV1zU.o:(.bss+0x4): first defined here
/tmp/ccLfG2oZ.o:(.bss+0x5): multiple definition of
`std::tr1::placeholders::(anonymous namespace)::_5'
/tmp/ccqbV1zU.o:(.bss+0x5): first defined here
/tmp/ccLfG2oZ.o:(.bss+0x6): multiple definition of
`std::tr1::placeholders::(anonymous namespace)::_6'
/tmp/ccqbV1zU.o:(.bss+0x6): first defined here
/tmp/ccLfG2oZ.o:(.bss+0x7): multiple definition of
`std::tr1::placeholders::(anonymous namespace)::_7'
/tmp/ccqbV1zU.o:(.bss+0x7): first defined here
/tmp/ccLfG2oZ.o:(.bss+0x8): multiple definition of
`std::tr1::placeholders::(anonymous namespace)::_8'
/tmp/ccqbV1zU.o:(.bss+0x8): first defined here
/tmp/ccLfG2oZ.o:(.bss+0x9): multiple definition of
`std::tr1::placeholders::(anonymous namespace)::_9'
/tmp/ccqbV1zU.o:(.bss+0x9): first defined here
/tmp/ccLfG2oZ.o:(.bss+0xa): multiple definition of
`std::tr1::placeholders::(anonymous namespace)::_10'
/tmp/ccqbV1zU.o:(.bss+0xa): first defined here
It occurs with gcc-4.1 (gcc version 4.1.3 20071126 (prerelease)), but is fixed
at least in 4.2.1
--
Summary: template variable not getting marked as weak when
defined in pch
Product: gcc
Version: 4.1.3
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rbuergel at web dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34309
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/34309] template variable not getting marked as weak when defined in pch
2007-12-01 16:11 [Bug c++/34309] New: template variable not getting marked as weak when defined in pch rbuergel at web dot de
@ 2007-12-01 16:15 ` rbuergel at web dot de
2007-12-08 20:29 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: rbuergel at web dot de @ 2007-12-01 16:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rbuergel at web dot de 2007-12-01 16:15 -------
I forgot to mention, that gcc works correctly, if the header is not
precompiled.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34309
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/34309] template variable not getting marked as weak when defined in pch
2007-12-01 16:11 [Bug c++/34309] New: template variable not getting marked as weak when defined in pch rbuergel at web dot de
2007-12-01 16:15 ` [Bug c++/34309] " rbuergel at web dot de
@ 2007-12-08 20:29 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-08 20:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-12-08 20:29 -------
Actually this is the anonymous namespace issue which means this is a duplicate
of PR 10591 which was fixed for 4.2.0.
*** This bug has been marked as a duplicate of 10591 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34309
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-08 20:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-01 16:11 [Bug c++/34309] New: template variable not getting marked as weak when defined in pch rbuergel at web dot de
2007-12-01 16:15 ` [Bug c++/34309] " rbuergel at web dot de
2007-12-08 20:29 ` pinskia 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).