This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ automatic template instantiation?
- To: Mike Stump <mrs at windriver dot com>, gcc at gcc dot gnu dot org
- Subject: Re: C++ automatic template instantiation?
- From: Tudor Hulubei <tudor dot hulubei at ecora dot com>
- Date: Wed, 19 Apr 2000 17:18:11 -0400 (EDT)
- Organization: ecora.com
- References: <200004192022.NAA16570@kankakee.wrs.com>
- Reply-To: Tudor Hulubei <tudor dot hulubei at ecora dot com>
On Wednesday, 19 April 2000, Mike Stump wrote:
> It won't be without bug reports. With bug reports it stands a chance
> at bug fixes. Generally speaking, if you want to know if it works in
> a particular instance, you're going to have to try it.
Here is one. Please notice that subsequent invocations of "c++ t.o"
generate different error messages.
Tudor
RedHat Linux 6.2,
Reading specs from /home/tudor/opt/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)
stack.cc:
#include <stack>
int main() { stack<int> x; }
[tudor@data]:~ $ c++ -frepo -c t.cc
[tudor@data]:~ $ c++ t.o
collect: recompiling t.cc
collect: relinking
t.o: In function `deque<int, allocator<int>, 0>::~deque(void)':
t.o(.text+0x51): undefined reference to `_Deque_base<int, allocator<int>, 0>::~_Deque_base(void)'
t.o: In function `_Deque_base<int, allocator<int>, 0>::_Deque_base(allocator<int> const &, unsigned int)':
t.o(.text+0xa7): undefined reference to `_Deque_base<int, allocator<int>, 0>::_M_initialize_map(unsigned int)'
t.o: In function `deque<int, allocator<int>, 0>::deque(allocator<int> const &)':
t.o(.text+0xf7): undefined reference to `_Deque_base<int, allocator<int>, 0>::~_Deque_base(void)'
collect2: ld returned 1 exit status
[tudor@data]:~ $ c++ t.o
collect: recompiling t.cc
collect: relinking
t.o: In function `_Deque_base<int, allocator<int>, 0>::~_Deque_base(void)':
t.o(.text+0x83): undefined reference to `_Deque_base<int, allocator<int>, 0>::_M_destroy_nodes(int **, int **)'
t.o: In function `_Deque_base<int, allocator<int>, 0>::_M_initialize_map(unsigned int)':
t.o(.text+0x169): undefined reference to `_Deque_base<int, allocator<int>, 0>::_M_create_nodes(int **, int **)'
collect2: ld returned 1 exit status
[tudor@data]:~ $ c++ t.o
collect: recompiling t.cc
collect: relinking
t.o: In function `deque<int, allocator<int>, 0>::~deque(void)':
t.o(.gnu.linkonce.t._._t5deque3ZiZt9allocator1ZiUi0+0x51): undefined reference to `_Deque_base<int, allocator<int>, 0>::~_Deque_base(void)'
t.o: In function `deque<int, allocator<int>, 0>::deque(allocator<int> const &)':
t.o(.deque<int, allocator<int>, 0>::gnu.linkonce.t.(allocator<int> const &)+0x37): undefined reference to `_Deque_base<int, allocator<int>, 0>::~_Deque_base(void)'
t.o: In function `_Deque_base<int, allocator<int>, 0>::_Deque_base(allocator<int> const &, unsigned int)':
t.o(._Deque_base<int, allocator<int>, 0>::gnu.linkonce.t.(allocator<int> const &, unsigned int)+0x43): undefined reference to `_Deque_base<int, allocator<int>, 0>::_M_initialize_map(unsigned int)'
collect2: ld returned 1 exit status
[tudor@data]:~ $ c++ t.o
collect: recompiling t.cc
collect: relinking
t.o: In function `_Deque_base<int, allocator<int>, 0>::~_Deque_base(void)':
t.o(.text+0x19b): undefined reference to `_Deque_base<int, allocator<int>, 0>::_M_destroy_nodes(int **, int **)'
t.o: In function `_Deque_base<int, allocator<int>, 0>::_M_initialize_map(unsigned int)':
t.o(.text+0x285): undefined reference to `_Deque_base<int, allocator<int>, 0>::_M_create_nodes(int **, int **)'
collect2: ld returned 1 exit status
[tudor@data]:~ $