public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/21264] duplicate symbol warnings for complex template class [not found] <bug-21264-5469@http.gcc.gnu.org/bugzilla/> @ 2006-05-31 2:28 ` bangerth at dealii dot org 2006-05-31 7:21 ` joerg dot richter at pdv-fs dot de 2006-05-31 14:58 ` bangerth at dealii dot org 2 siblings, 0 replies; 6+ messages in thread From: bangerth at dealii dot org @ 2006-05-31 2:28 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from bangerth at dealii dot org 2006-05-31 02:28 ------- Can you verify whether this problem persists in the gcc 4.0.x series or later? gcc 3.4.x is no longer maintained, and any patch will not be backported. Thanks W. -- bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bangerth at dealii dot org Status|UNCONFIRMED |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21264 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21264] duplicate symbol warnings for complex template class [not found] <bug-21264-5469@http.gcc.gnu.org/bugzilla/> 2006-05-31 2:28 ` [Bug c++/21264] duplicate symbol warnings for complex template class bangerth at dealii dot org @ 2006-05-31 7:21 ` joerg dot richter at pdv-fs dot de 2006-05-31 14:58 ` bangerth at dealii dot org 2 siblings, 0 replies; 6+ messages in thread From: joerg dot richter at pdv-fs dot de @ 2006-05-31 7:21 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from joerg dot richter at pdv-fs dot de 2006-05-31 07:21 ------- I can't see the problem with 4.1.1. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21264 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21264] duplicate symbol warnings for complex template class [not found] <bug-21264-5469@http.gcc.gnu.org/bugzilla/> 2006-05-31 2:28 ` [Bug c++/21264] duplicate symbol warnings for complex template class bangerth at dealii dot org 2006-05-31 7:21 ` joerg dot richter at pdv-fs dot de @ 2006-05-31 14:58 ` bangerth at dealii dot org 2 siblings, 0 replies; 6+ messages in thread From: bangerth at dealii dot org @ 2006-05-31 14:58 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from bangerth at dealii dot org 2006-05-31 14:57 ------- Thanks for the feedback. It is apparently fixed then... W. -- bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21264 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21264] New: duplicate symbol warnings for complex template class @ 2005-04-28 12:08 joerg dot richter at pdv-fs dot de 2005-05-03 19:10 ` [Bug c++/21264] " dje at gcc dot gnu dot org ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: joerg dot richter at pdv-fs dot de @ 2005-04-28 12:08 UTC (permalink / raw) To: gcc-bugs /// template.cc ///////////////////////////////////////// struct VirtualBase { virtual ~VirtualBase(); }; struct Foo {}; struct Bar { virtual ~Bar(); }; template<class OtherBase> class Test : public VirtualBase, public OtherBase { }; void func() { Test<Foo> foo; Test<Bar> bar; } ////////////////////////////////////////// $ /tools/pkg/gcc/3.4.3/bin/g++ -shared -Wl,-G -o lib343.so template.cc $ dump -Tv lib343.so | c++filt IMEX Sclass Type IMPid Name EXP DS Ldef [noIMid] Test<Bar>::~Test() EXP DS Ldef [noIMid] Test<Bar>::~Test() wEXP DS SECdef [noIMid] non-virtual thunk to Test<Bar>::~Test() wEXP DS SECdef [noIMid] non-virtual thunk to Test<Bar>::~Test() wEXP DS SECdef [noIMid] Test<Foo>::~Test() wEXP DS SECdef [noIMid] Test<Foo>::~Test() $ /tools/pkg/gcc/3.3.3/bin/g++ -shared -Wl,-G -o lib333.so template.cc $ dump -Tv lib333.so | c++filt IMEX Sclass Type IMPid Name wEXP DS SECdef [noIMid] Test<Bar>::~Test() wEXP DS SECdef [noIMid] Test<Bar>::~Test() wEXP DS SECdef [noIMid] non-virtual thunk to Test<Bar>::~Test() wEXP DS SECdef [noIMid] non-virtual thunk to Test<Bar>::~Test() wEXP DS SECdef [noIMid] Test<Foo>::~Test() wEXP DS SECdef [noIMid] Test<Foo>::~Test() Note that I edited the dump output to reduce its size. Here you can see, that the Test<...>::~Test() destructor gets a different IMEX. Depending on its template parameter and/or compiler version. I dont know exactly what the difference between EXP and wEXP is, but I suspect that this has something to do with weak symbols. But on the other hand, I always read that AIX supports no weak symbols. Nevertheless, when using the class Test<Bar> in different shared libraries which get linked together, you get warnings about duplicate symbols. This warnings were not present with GCC 3.3.3. I am very nervous when seeing duplicate symbols. Especially on AIX. I had great times in the past analysing problems with uncaught exceptions that were caused by duplicate symbols. -- Summary: duplicate symbol warnings for complex template class Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: joerg dot richter at pdv-fs dot de CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: powerpc-ibm-aix5.2.0.0 GCC host triplet: powerpc-ibm-aix5.2.0.0 GCC target triplet: powerpc-ibm-aix5.2.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21264 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21264] duplicate symbol warnings for complex template class 2005-04-28 12:08 [Bug c++/21264] New: " joerg dot richter at pdv-fs dot de @ 2005-05-03 19:10 ` dje at gcc dot gnu dot org 2005-05-17 14:51 ` aph at gcc dot gnu dot org 2005-05-31 17:28 ` pinskia at gcc dot gnu dot org 2 siblings, 0 replies; 6+ messages in thread From: dje at gcc dot gnu dot org @ 2005-05-03 19:10 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From dje at gcc dot gnu dot org 2005-05-03 19:09 ------- AIX 5.2 supports weak symbols, when using AIX assembler and linker. wEXP means weak export and EXP means export. I do not see this problem when using GCC 4.0. I am not sure if the patch for this was or will be backported to GCC 3.4. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21264 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21264] duplicate symbol warnings for complex template class 2005-04-28 12:08 [Bug c++/21264] New: " joerg dot richter at pdv-fs dot de 2005-05-03 19:10 ` [Bug c++/21264] " dje at gcc dot gnu dot org @ 2005-05-17 14:51 ` aph at gcc dot gnu dot org 2005-05-31 17:28 ` pinskia at gcc dot gnu dot org 2 siblings, 0 replies; 6+ messages in thread From: aph at gcc dot gnu dot org @ 2005-05-17 14:51 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From aph at gcc dot gnu dot org 2005-05-17 14:49 ------- *** Bug 20088 has been marked as a duplicate of this bug. *** -- What |Removed |Added ---------------------------------------------------------------------------- CC| |timo dot lindfors at iki dot | |fi http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21264 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21264] duplicate symbol warnings for complex template class 2005-04-28 12:08 [Bug c++/21264] New: " joerg dot richter at pdv-fs dot de 2005-05-03 19:10 ` [Bug c++/21264] " dje at gcc dot gnu dot org 2005-05-17 14:51 ` aph at gcc dot gnu dot org @ 2005-05-31 17:28 ` pinskia at gcc dot gnu dot org 2 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-05-31 17:28 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- GCC build triplet|powerpc-ibm-aix5.2.0.0 | GCC host triplet|powerpc-ibm-aix5.2.0.0 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21264 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-05-31 14:58 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-21264-5469@http.gcc.gnu.org/bugzilla/> 2006-05-31 2:28 ` [Bug c++/21264] duplicate symbol warnings for complex template class bangerth at dealii dot org 2006-05-31 7:21 ` joerg dot richter at pdv-fs dot de 2006-05-31 14:58 ` bangerth at dealii dot org 2005-04-28 12:08 [Bug c++/21264] New: " joerg dot richter at pdv-fs dot de 2005-05-03 19:10 ` [Bug c++/21264] " dje at gcc dot gnu dot org 2005-05-17 14:51 ` aph at gcc dot gnu dot org 2005-05-31 17:28 ` 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).