public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25369]  New: 4.0 regression: use of inline function in template class leads to undefined reference
@ 2005-12-12 14:21 peter dot soetens at fmtc dot be
  2005-12-12 14:23 ` [Bug c++/25369] " peter dot soetens at fmtc dot be
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: peter dot soetens at fmtc dot be @ 2005-12-12 14:21 UTC (permalink / raw)
  To: gcc-bugs

When using boost::bind to wrap an inline function
in a function object leads, this leads to an undefined reference to that
function.
The bug is caused because the class that produces the function object is a
template class.

GCC 3.3 and 3.4 work fine. Output from 4.0 compiler is:

$ g++-4.0 test_undefined_symb4.0.cpp -o test_undefined_symb4.0
/tmp/ccBl8CSy.o: In function `Event<int>::emit()':
test_undefined_symb4.0.cpp:(.gnu.linkonce.t._ZN5EventIiE4emitEv[Event<int>::emit()]+0x21):
undefined reference to `boost::shared_ptr<E>::get() const'
collect2: ld returned 1 exit status

$ g++-4.0 --version
g++-4.0 (GCC) 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)

Attachment with example code follows.


-- 
           Summary: 4.0 regression: use of inline function in template class
                    leads to undefined reference
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: peter dot soetens at fmtc dot be
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25369


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2006-02-01 11:58 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-12 14:21 [Bug c++/25369] New: 4.0 regression: use of inline function in template class leads to undefined reference peter dot soetens at fmtc dot be
2005-12-12 14:23 ` [Bug c++/25369] " peter dot soetens at fmtc dot be
2005-12-12 19:31 ` pinskia at gcc dot gnu dot org
2005-12-13 12:06 ` peter dot soetens at fmtc dot be
2005-12-13 12:09 ` peter dot soetens at fmtc dot be
2005-12-13 15:37 ` [Bug c++/25369] [3.4/4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2005-12-13 15:37 ` pinskia at gcc dot gnu dot org
2005-12-19 19:33 ` mmitchel at gcc dot gnu dot org
2005-12-21  2:49 ` reichelt at gcc dot gnu dot org
2005-12-22  9:17 ` reichelt at gcc dot gnu dot org
2005-12-22 20:51 ` mmitchel at gcc dot gnu dot org
2005-12-23  7:40 ` mmitchel at gcc dot gnu dot org
2005-12-23  7:42 ` mmitchel at gcc dot gnu dot org
2005-12-23  7:50 ` mmitchel at gcc dot gnu dot org
2005-12-23  7:53 ` [Bug c++/25369] [3.4 " mmitchel at gcc dot gnu dot org
2006-01-31 20:25 ` reichelt at gcc dot gnu dot org
2006-02-01 11:57 ` reichelt at gcc dot gnu dot org
2006-02-01 11:58 ` reichelt 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).